You are on page 1of 1

Practical exam

Duration: 70’

Write a C program with the menu: [1]


A. Option1
B. Option2
C. Exit

Option 1: Input a year (year is a integer number and >=1). You are required to display the output
like below
ex:
input: year= 2000 [4]
And the output likes:
Year days
1 31
2 29
3 31
4 30
5 31
6 30
7 31
8 31
9 30
10 31
11 30
12 31

Option 2: Input the list of integer number and then: [5]


- Find the max value in the list.
- Display positions where values equal the max value.
Ex: input count= 8
24351525
output: the max value: 5
positions of max value are: 3, 5, 7

The end

You might also like