You are on page 1of 1

Assignment 1 (10 Marks)

1. Write a C program code which use the while-loop structure that display the number 0 until
99, with the following arrangements:

I. the first line has the number 0 until 9


II. the second line has the number 10 until 19, the third 20 until 29, and so on
III. finishing with the line that has the number 90 until 99.
(2 marks)

2. Modify the code above to produce output with the following instructions:

I. prompt user for an integer from 0 to 10;


II. then, display the multiples of the number entered by the user at the same exact location
as they were printed in question 1 above;
III. for non-multiple, display as 0.
(8 marks)

Example output:

a) When the user input number is 3.

b) When the user input number is 7.

You might also like