qbasic program WAP using let statement to find area of square [side*side]
Answers
Answered by
3
SOLUTION.
Here comes the code for the question.
CLS
INPUT "Enter a number: "; SIDE
AREA = SIDE ^ 2
PRINT "Area of the square is: "; AREA
END
EXPLANATION.
- Line 1: Clears the screen.
- Line 2: Accept the side of the square as input.
- Line 3: Calculate the area of the square.
- Line 4: Display the area of the square.
- Line 5: End of program.
See attachment for output.
Attachments:
Similar questions