Assignments [ Assignment 3 ] - C Programming
1. Write a program to input BD[
Birthday], BM[Birth Month], BY [ Birth Year ], CD[ Current day ], CM [ current
Month ], CY [ Current Year]. Then calculate the age of a person. One should
display the output in the following format
Your Age Today is :
…………………… Day(s).
…………………… Month(s).
…………………. Year(s).
2. Input the marks of five subjects. Then
print the grade : the calculation of grade is as :
a. %marks more than 50 but less than
equals to 60 – GRADE C
b. More than 60 but less than equals to 70
– GRADE B
c. More than 70 – GRADE A
d. Less than 50 – FAIL
3. Jack makes some purchases from xyz
departmental store. He gets some discount on purchases made : Purchases more than 1000 but less then 1500 –
10% discount, more than 1500 but less than 2000 – 20 % , more than 2000 30%.
Input no of items and unit per price and then calculate the bill.
4. Input a three digit number [ say 459 ]
and print it in word . e.g. Four Hundred and Fifty Nine
5. Input DD , MM and YYYY and print the
date in words with proper suffix as : nd, rd, th, st. Say for example if the
date is 22/03/2010 then the answer would be 22nd March 2010.
Comments
Post a Comment