Computer Science, asked by nutansingh1405, 10 hours ago

Write a program in QBasic to add 5 numbers using variables and input statement...​

Answers

Answered by sayak05112000
2

Answer:

CLS

INPUT ” Enter the first number ” ;a

INPUT ” Enter the second number ” ;b

INPUT ” Enter the third number ” ;c

INPUT ” Enter the fourth number ” ;d

INPUT ” Enter the fifth number ” ;e

LET S = a+b+c+d+e

PRINT” The Sum of 5 numbers= ” ;S

END

Explanation:

CLS COMMAND: clears the screen

INPUT command is used to take inputs of each variable from the user

LET is an assignment statement which stores the value of addition in S

PRINT is used to print characters on the screen

END is used to signify the end of the program

Similar questions