www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# CS201 Assignment#01 Solution & Discussion Due Date:05-11-2010

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;

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;

Sample Input and Output
C

A

A

Total No. of A Grades = 6

Views: 376

### 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;
do
{
{
countA++;
}
else
{
countB++;
}
else
continue; }
counTotal++;
}while (counTotal <= 10);
cout"Total No. of A Grades = "countAendl;
else if (countA < 8 && countA >2){cout"Your class is Good!"endl;}
getch();
return 0;
}
*/Good luck*/

1

2

3

4

5

## VIP Member Badge & Others

------------------------------------

## Latest Activity

Fatima replied to Fatima's discussion eco403 assignment solution 2 in the group ECO403 Macroeconomics
24 minutes ago
vu student updated their profile
25 minutes ago

### Jannah ? Hold you deen tight.

56 minutes ago
2 hours ago
3 hours ago
Muhammad Bilal replied to BBA(6th smes)'s discussion assignment 1 spring 2021 in the group MGT402 Cost & Management Accounting
4 hours ago
★---★ ⱮԱϚҠȺហ ȺచȺហ ★---★ updated their profile
4 hours ago
Mani Siddiqui posted a discussion

5 hours ago