answersLogoWhite

0


Best Answer

10 CLS

20 FOR n = 1 to 10

30 PRINT n, n^2, n^3

40 NEXT n

50 PRINT: PRINT: PRINT "Touch 'x' to go again, any other key to end."

60 INPUT a$

70 IF a$ = "X" or a$ = "x" THEN 10

80 END

User Avatar

Wiki User

βˆ™ 13y ago
This answer is:
User Avatar
More answers
User Avatar

AnswerBot

βˆ™ 4d ago

Here is a sample QBasic program to print the squares and cubes of the first 10 natural numbers:

FOR i = 1 TO 10
    PRINT "Number: ", i
    PRINT "Square: ", i * i
    PRINT "Cube: ", i * i * i
NEXT i

This program uses a FOR loop to iterate through the first 10 natural numbers and calculates and prints their squares and cubes accordingly.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a qbasic program to print the squares and cubes of first 10 natural numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Educational Theory
Related questions

How do you write a Qbasic program to display these Numbers-0112358132134?

you do this 10 print "0112358132134" use the whole of the thing


Do you need statement numbers in QBASIC?

Statement numbers were a feature of BASIC, and while QBASIC supports them, they are by no means necessary.


What command statement terminates the qbasic program?

END '...END of program/halt program code execution. *NOTE*: There should be only 'one' END statement written inside of a QBASIC program. I have seen example code where they use multiple END statements; this is wrong!


How do you find the greater number in qbasic?

Give your numbers the names 'A' and 'B', and use these program lines. Whichever of the two numbers is greater will be printed. G = A If B > A THEN G = B. PRINT "The greater number is "; G


How to sort the sum of numbers in qbasic?

You use the relevant formula.


What is the explanation for the two modes of QBASIC?

(1) Immediate mode In this mode, QBASIC performs the command/instruction that we type in immediately after we press the enter key. (2) Program mode In this mode, the instructions/commands we type in are not performed as we type them in, but are first stored in the computer memory as a program. This program can be executed later, at a high speed.


Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end


How do you write a qbasic program to find area and circumerence of a circle?

Write a program that calculates the area of a triangle in QBASIC


Write a program in qbasic to make a hut using print statemant?

a triangle then a square :)


What has the author H Tornsdorf written?

H. Tornsdorf has written: 'Windows 3.1 - Trucos y Consejos' 'QBasic for beginners' -- subject(s): QBasic (Computer program language)


To print even nobetween 10 and 100 on qbasic command?

You need a code that can run to print even numbers between 10 and 100 using the qbasic command.


Is qbasic a high level language?

The QBASIC program actually comes in 2 different flavors... A> QBASIC interpreter program: QBASIC Version 1.1 B> QBASIC compiler program: QBASIC 4.5/or, QB64/or, -etc. ...so, the answer is that this programming language comes in both forms: 'interpreter/compiler' versions; and, you have to select which of these you would prefer to download and use. *NOTE*: The compiler version of the language tends to be much larger; whereas, the interpreter version of the language tends to be small/very compact, indeed; thus, the interpreter tends to take up far less disk space. Many people start off their programming career by using QBASIC version 1.1 'interpreter' program; in order to learn 'how to' program. The interpreter version of the program can only create plain text (.bas) files; the which code CANNOT be shared with others; (not unless the persons who you are sharing this type of code with do already have a copy of the QBASIC interpreter program installed on their own computer). Then, later on, down the line...when they have become fully capable programmers themselves; they go and download a QBASIC 'compiler' program version, instead; which will allow them to go and create stand alone (.exe) program files that they can share with anybody. This is because (.exe) program files can RUN/execute entirely independently of the QBASIC program itself.