4. What is the significance of selecting New program option before
writing a program in QBASIC? Explain.
Answers
Answered by
1
Answer:
Rem calculator
cls
10
print "input first operand"
input a
print "select operation"
print "addition(a)"
print "subtraction(s)"
print "multiplication(m)"
print "division(d)"
print "exponentification(e)"
print "rooting(r)"
print "Quit(q)"
do
next$ = inkey$
loop until next$ <> ""
gosub input_var2
select case next$
case "a"
c = a + b
print "sum is:";c
case "s"
c = a - b
print "Difference is:";c
case "m"
c= a*b
print "Product is :";c
case "d"
c = a/b
print "Quotient is:";c
case "e"
c = a^b
print "Exponentification is:"c
case "r"
c = a^ 1/b
print "Root is:";c
case "q"
end
end select
sleep 3
goto 10
sub input_var
input "enter second operand";b
end sub
Explanation:
just u check it
Similar questions
Environmental Sciences,
2 months ago
Chemistry,
2 months ago
English,
4 months ago
Math,
10 months ago
English,
10 months ago
Computer Science,
10 months ago