//Program: This program distribute your Grade with respect to marks.
//Programmer: Muhammad Ateek. Roll#03
//Date: 10/29/2011.
#include <iostream>
#include <limits>
using namespace std;
int main()
{
cout << "Enter your obtained marks \n";
// Declrations
int marks;
cin >> marks;
cout << "your abtained marks are = ";
cout << marks << endl;
//Statments
if(marks<40) //If statments.
{
cout << "Sorry you have been fail";
}
else if (marks>=40,marks<=49)
{
cout << "you have been passes and your grade is C";
}
else if(marks>=50,marks<=59)
{
cout << "You have been passed and you grade is B";
}
else if(marks>=60,marks<=69)
{
cout << "You have been passed and your grade is B+";
}
else if(marks>=70,marks<=79)
{
cout << "you have been passed and your grade is A";
}
else if (marks>=80,marks<=100)
{
cout << "you have been passed and your grade is A+";
}
else
{
cout <<"ERROR\n";
cout << "please enter your obtained marks out of 100";
}
cin.ignore(numeric_limits<streamsize>::max(), '\n'); // program screen stop.
cin.get();
return 0; // Ending
}
Thursday, 24 January 2013
Grade Programming
08:22
ATEEK
No comments
0 comments:
Post a Comment