11-01-2010, 08:23 PM
[FONT="]Assignment No. 1
Semester: Fall 2010[/FONT]
Semester: Fall 2010[/FONT]
[/FONT] [FONT="]Total Marks: 20[/FONT]
[FONT="]Due Date: 05th November, 2010
[/FONT] [FONT="]Problem Statement: Calculating No. of A Grades in Class [/FONT]
[FONT="]You are required to write a program which should take input from user in the form of characters A or B. Based upon user’s input you should calculate no. of A grades. You should use while loop or do/while loop for taking input and if / else condition for making decisions. [/FONT]
[FONT="]Detailed Description:[/FONT]
[FONT="] [/FONT]
[FONT="]The program should display like;[/FONT]
[FONT="] [/FONT]
[FONT="]Please Enter Grade (‘A’ OR ‘B’ )[/FONT]
[FONT="] [/FONT]
[FONT="]Then the program should take 10 inputs one by one, [/FONT]
[FONT="] [/FONT]
- [FONT="]After taking 10 inputs, you should display no. of A grades.[/FONT]
- [FONT="]If A grades are less than or equal to 2, you should display a message “Your class is Poor!”. [/FONT]
- [FONT="]If A grades are less than or equal to 7, you should display a message “Your class is Good!”.[/FONT]
- [FONT="]If A grades are greater than or equal to 8, you should display a message “Your class is Brilliant!”.[/FONT]
- [FONT="]The user should enter either A or B. If user has entered other than A or B, e.g. C,D,E etc. Your program should display a message like; [/FONT]
[FONT="] [/FONT]
[FONT="]Sample Input and Output [/FONT]
[FONT="] [/FONT]
[FONT="]Please Enter Grade of student 1 : [/FONT]
[FONT="]A[/FONT]
[FONT="]Please Enter Grade of student 2 : [/FONT]
[FONT="]A[/FONT]
[FONT="]Please Enter Grade of student 3 : [/FONT]
[FONT="]B[/FONT]
[FONT="]Please Enter Grade of student 4 : [/FONT]
[FONT="]A[/FONT]
[FONT="]Please Enter Grade of student 5 : [/FONT]
[FONT="]B[/FONT]
[FONT="]Please Enter Grade of student 6 : [/FONT]
[FONT="]B[/FONT]
[FONT="]Please Enter Grade of student 7 : [/FONT]
[FONT="]A[/FONT]
[FONT="]Please Enter Grade of student 8 : [/FONT]
[FONT="]B[/FONT]
[FONT="]Please Enter Grade of student 9 : [/FONT]
[FONT="]C[/FONT]
[FONT="] [/FONT]
[FONT="]Please Enter ‘A’ or ‘B’ grade only![/FONT]
[FONT="]Please Enter Grade of student 9 : [/FONT]
[FONT="]A[/FONT]
[FONT="] [/FONT]
[FONT="]Please Enter Grade of student 10 : [/FONT]
[FONT="]A[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="]Total No. of A Grades = 6[/FONT]
[FONT="] [/FONT]
[FONT="]Your Class is Good![/FONT]
Solution will be uploaded soon.
