VUsolutions Transferred to AchiKhasi.com

From December 2011, this blog www.VUsolutions.blogspot.com is transferred to http://achikhasi.com/vu/ . So, you may visit http://achikhasi.com/vu/ for latest study related help.

Back to home VUsolutions

VUsolutions Fans Club [join us for MORE solutions]

VUsolutions on Facebook

CS201 Assignment No. 1 Announced

Monday, November 01, 2010 Posted In Edit This
Assignment No. 1
Semester: Fall 2010
CS201: Introduction to Programming
Total Marks: 20

Due Date: 05th November, 2010
Problem Statement: Calculating No. of A Grades in Class
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.

Detailed Description:
The program should display like;

Please Enter Grade (‘A’ OR ‘B’ )
Then the program should take 10 inputs one by one,

  • After taking 10 inputs, you should display no. of A grades.
  • If A grades are less than or equal to 2, you should display a message “Your class is Poor!”.
  • If A grades are less than or equal to 7, you should display a message “Your class is Good!”.
  • If A grades are greater than or equal to 8, you should display a message “Your class is Brilliant!”.
  • 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;
"Please Enter 'A' or 'B' grade only!"

Sample Input and Output
Please Enter Grade of student 1 :
A
Please Enter Grade of student 2 :
A
Please Enter Grade of student 3 :
B
Please Enter Grade of student 4 :
A
Please Enter Grade of student 5 :
B
Please Enter Grade of student 6 :
B
Please Enter Grade of student 7 :
A
Please Enter Grade of student 8 :
B
Please Enter Grade of student 9 :
C

Please Enter ‘A’ or ‘B’ grade only!
Please Enter Grade of student 9 :
A
Please Enter Grade of student 10 :

A

Total No. of A Grades = 6

Your Class is Good!

Back to home VUsolutions

Shaadi.com: Just create ur account & find ur partner or EARN money, its reall & EASY

VUsolutions Followers (Join NOW and Get Extra Benefits)

Install LATEST toolbar having lot of features - GET solutions on Desktop

toolbar powered by Conduit
Caliplus 300x250 NoFlam VitoLiv 468x60 GlucoLo