143k views
1 vote
What is the Output of this qbasic program ​

What is the Output of this qbasic program ​-example-1
User Miya
by
3.6k points

1 Answer

3 votes

Answer:

The output will be: 10

Step-by-step explanation:

Let us look at the code line by line

CLS

This line will clear the screen before output.

LET A = 10

This line will assign the value 10 to A

LET B=20

This line will assign the value 20 to B

LET C = (A+B)/3

This line will first calculate the value of sum of A and B, divide it by 3 and then store it in C.


A+B = 10+20 = 30\\(A+B)/3 = 30/3 = 10

The value 10 will be stored in C

LET D = C^2

This line will calculate the square of value of C and store it in D

So the value in D will be: 10^2 = 100

PRINT C

This will print the value of C on screen.

The output will be: 10

User Odlan Yer
by
3.5k points