I need this in PSEUDOCODE please:
Write a FOR loop (just the loop) to print out the following sequence of numbers: 1, 4, 7, 10, 13, 16, 19, 22, 25
SOLUTION:
Dear Student, I am writing a pseudocode for the given query. And i am also explaining the pseudocode with the comments for your understanding.
PSEUDOCODE:
START
SET A = 1 // Firstly we set A with 1
FOR I = 1 TO 9 // Start the loop i = 1 and go
through till 9
DISPLAY: VALUE OF A // Now we print the value of A
that is starting from 1
A = A + 3 (INCREMENT BY 3 IN
A) // After that increment in A by 3 so it prints
1, 4, 7......so on
END FOR // And after that end of the for loop
STOP
OUTPUT:
1 4 7 10 13 16 19 22 25
Get Answers For Free
Most questions answered within 1 hours.