Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

File name <Surname, First Name M.I.

>

REPETITION AND LOOP STATEMENTS

1. Write a program that displays the multiplication table for


numbers 0-9.

2. Write nests of loops that cause the following output to be


displayed.
0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
0 1 2 3 4
0 1 2 3
0 1 2
0 1
0

ARRAYS

1. Write an indexed for loop to fill an array prime such that


element prime[0] contains the first prime number, prime[1]
the second prime number, and so on. The prime numbers will
be provided as data. Also, write a loop that calculates the
sum of all the prime numbers stored.

FUNCTIONS

1. Write a menu driven Calculator program using Functions in C.


Hint: You can use Switch Case and If statements)

You might also like