Question :
Write a program in QBASIC ti enter a Number and then calculate whether it is positive or negative (please Friends don't spam)
Answers
Answered by
11
Answer:
Input
CLS
INPUT "Enter a number "; N
IF N >0 THEN PRINT "A Positive number " ELSE PRINT " A negative number "
END
Explanation:
Refer the image
- 1st picture is my input and,
- 2nd picture is my output
Output
- Enter a Number = -81
•°• A negative Number
Know more
- Endif statement is used only after the IF <Condition> Then format .
- Elseif statement allows performing multiple tasks in a program.
Attachments:
RockingStarPratheek:
Good Answer!
Similar questions