CS201 Assignment # 1 Solution
CS201 Assignment # 1 Solution
It should be clear that your assignment will not get any credit
if:
§ The assignment is submitted after due date.
§ The submitted assignment does not open or file is corrupt.
All types of plagiarism are strictly prohibited.
Objective
The objective of this assignment is to provide hands on experience of
using
§Basic concepts of C/C++ language and Programming
§Writing, Compiling and Executing a C program
§Conditional statements of C language
§Loops in C language
Guidelines
§Code should be properly aligned and well commented.
§Follow C/C++ rules while writing variables names, function names
etc.
§Use only Dev-C++ IDE for this assignment.
Assignment
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:
...............
using namespace std;
#include
#include
main()
{
int totalstudent=1;
int A =0,B=0;
char grad(1);
}
}
if (A <=2)
{
cout"\nYour class is Poor!\n";
}else if (A <=7)
cout"\nYour class is Good!\n";
else
{
cout"\nYour class is Brilliant!\n";
}
getche();