Computer Science, asked by dreamerboy888, 1 year ago

Write a qbasic program to find out sum of any three numbers.

Answers

Answered by ghsbksgd
55

10 LET a = 15

20 LET b = 20

30 LET c = 40

40 SUM = a + b + c

50 Print "Sum of" a "and" b "and" c "is" SUM

Answered by Anonymous
46

CLS    //Clears out the screen.

INPUT “ENTER FIRST NUMBER”; A   //Takes input for 1st number from the user

INPUT “ENTER SECOND NUMBER”; B  //Takes input for 2nd number from the user

INPUT “ENTER THIRD NUMBER”; C //Takes input for 3rd number from the user

S = A + B  + C   //Formula to generate sum.

PRINT “SUM OF THREE NUMBERS ARE:”; S  //Prints the output on the screen

END   //Ends the program

//The text within the the quotation marks is printed as it is.

Similar questions