You are on page 1of 1

Lab 8

1. Write a C program that will read a series of number from the user and store them in an array
called number[]. The program should then calculate and display the product of all integers
entered by the user.

Sample input-output :
Enter total numbers to read : 5
Key in 5 numbers :
365 47

The product : 2520

2. Write a C program that will read 10 numbers from the user and store them in an array called
number[]. The program should then determine how many of the numbers entered by the user
are even and odd.

Sample input-output :
Key in 10 numbers : 1 2 3 4 5 6 7 8 9 10

The total number of even numbers entered are : 5

The total number of odd numbers entered are : 5

3. Write a C program that will read a sentence from the user and store them in an array called
sentence[]. The program should then display the sentence entered by the user to the screen.

Sample input-output :
Enter a sentence: Programming is fun
Sentence entered : Programming is fun.

You might also like