FOR X = 1 TO 5
PRINT X * X
NEXT X
Answers
Answered by
2
Given C∅de Snippet:
FOR X = 1 TO 5
PRINT X * X
NEXT X
Output:
1
4
9
16
25
Note: For verification, check out the attachment.
Explanation:
- The given program displays the square of numbers in the range 1 to 5.
- We can see that the loop iterates in the range X = 1 to 5. As step value is not mentioned, it is considered as - 1. After each iteration, the loop displays the value of X times X which is equal to the squares of numbers in the range.
Attachments:
Similar questions
Math,
1 month ago
Social Sciences,
1 month ago
Math,
1 month ago
Science,
3 months ago
Science,
3 months ago
Social Sciences,
10 months ago
Science,
10 months ago
Math,
10 months ago