Question #4: Use for statement to write a C program that asks the user to enter a positive integer number n. Then the program prints the following sequence: n , (n - 3) , (n – 6) , (n – 9), ……. , till...



Question #4:




Use for statement

to write a C program that asks the user to enter a positive integer number n. Then the program prints the following sequence:


n , (n - 3) , (n – 6) , (n – 9), ……. ,
till the smallest non-negative number



Example:


If the user entered 14, the program should print the sequence:


14 , 11 , 8 , 5 , 2 ,


If the user entered 12, the program should print the sequence:


12 , 9 , 6 , 3 , 0 ,




Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here