URGENT
WILL MARK BRAINLIEST TO BEST ANSWER
Complete the following programs: [6]
1. REM display first ten even numbers.
A = ------
L: PRINT ------
A = ------ + 2
IF A<= ------- THEN GOTO L
END
2. REM Display the table of a given number.
--------- “TYPE A NUMBER”; A
FOR ------ = 1 TO ------
PRINT A * C
--------- C
END
3. REM Display the first 10 natural numbers in reverse order.
-------- M = ------ TO 1 STEP ------
PRINT M
NEXT -------
END
Answers
Answered by
2
Answer:
1. Take the number N upto which we have to find the sum as input.
2. Using for loop take the elements one by one from 1 to N.
3. Using if,else statements separate the element as even or odd.
4. Add the even and odd numbers separately and store it in different variables.
5. Print the sum separately and exit.
Similar questions
Social Sciences,
15 hours ago
Computer Science,
15 hours ago
Hindi,
15 hours ago
English,
8 months ago
Math,
8 months ago