Computer Science, asked by Spacelove5dr, 3 months ago

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 blossomstar
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

  1. 1st picture is my input and,
  2. 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!
blossomstar: thank u my b.est friend prateek
Similar questions