We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

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

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 348

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

venice! insted of thinking about function, you should use loop in it.
brothers and sisters get this error free .cpp file. infact i pasted right be html excluded some symbols. and remember that they only demanded thru loop and if condition. all other ways will not be accepted so do the assignment as per instruction in it.
Attachments:
Thank You Mani.
Thank U mani
one more idea solution see the attached file pls
Attachments:
this is the true solution ? every one should use wisdom .
so be carefule..

#include
#include
int main()
{
int countA=0,countB=0,count=7;
char grade;
cout"Please Enter Grade ('A' OR 'B' ):";
do
{
cout " Please Enter Grade of student :" count endl;
cin>>grade;
if (grade=='A')
{
countA++;
}
else
if(grade=='B')
{
countB++;
}
else
{cout"Please Enter Grade ('A' OR 'B' ):"endl;
continue; }
counTotal++;
}while (counTotal <= 10);
cout"Total No. of A Grades = "countAendl;
if(countA>=8){cout"Your class is Brilliant!"endl;}
else if (countA < 8 && countA >2){cout"Your class is Good!"endl;}
else cout"Your class is Poor!"endl;
getch();
return 0;
}
*/Good luck*/

RSS

Latest Activity

Today Top Members 

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.