Professional Documents
Culture Documents
[2 x 5 =10]
Question 2
a)
b)
c)
d)
e)
[2 x 5 =10]
Question 3:
(i)
[6]
Page 1 of 3
[2]
Question 4
[15]
Write a program to accept the marks of a student in 5 subjects, find the percentage marks and based
on the same display one of the following messages:
Percentage Marks
>= 75
>= 60 and < 75
>= 45 and < 60
>= 40 and < 45
< 40
Message
1st Division with Distinction
2nd Division
3rd Division
4th Division
Failed
Question 5
[15]
13
21 n terms
Question 6
[15]
Write a program to accept a number between 1 to 7 from the user and display the corresponding
colour from the Rainbow colours using switchcase.
[Sequence of Rainbow colours : Violet, Indigo, Blue, Green, Yellow, Orange & Red]
Question 7
[15]
Write a function to find out the simple interest and compound interest, if the principle amount, rate
and time are passed as parameters to the function.
Question 8
[15]
[15]
Write a program to accept a number, find the sum and product of its digits and display those.
For example:
Input:
Output:
396556
Sum of digits : 34
Product of digits : 24300
Page 2 of 3
Page 3 of 3