1)Write a program in QBASIC to print your name 5 times.
2)Write a program in QBASIC to add 10 and 20.
PLEASE HELP ME WITH THIS...
PLEASE ANSWER FAST...
Answers
Answer:
1)
cls
input "enter your name";n
input "enter your address";a
print n
print a
end
cls
for i=1 to 5
input "enter your name";a
print a
next i
end
Similarly add the two no. using the same code..
Hope it helps you mate...
☺☺
1)Write a program in QBASIC to print your name 5 times.
PRINT "Enter your Name"
INPUT NAME$
FOR i = 1 TO 4
PRINT NAME$
NEXT i
2)Write a program in QBASIC to add 10 and 20.
SUM = 10 + 20
PRINT "The sum is:", SUM
Extra Information
Program to input two numbers and find their Sum, Subtraction, Multiplication, and Average
REM "Program to input two numbers and find their Sum, Subtraction, Multiplication, and Average"
PRINT "Enter first number"
INPUT NUMBER1
PRINT "Enter second number"
INPUT NUMBER2
SUM = NUMBER1 + NUMBER2
SUBTRACTION = NUMBER1 - NUMBER2
MULTIPLICATION = NUMBER1 * NUMBER2
AVERAGE = (NUMBER1 + NUMBER2) / 2
PRINT "The sum is:", SUM
PRINT "The subtraction is:", SUBTRACTION
PRINT "The multiplication is:", MULTIPLICATION
PRINT "The average is:", AVERAGE
REM is used for adding remarks you can remove that while running QBasic Program