#include "stdafx.h"
#include <stdlib.h>
#include <iostream>
#include <conio.h>
#include <iomanip>
#include <math.h>
#include <Windows.h>
usingnamespace std;
int _tmain(int argc, _TCHAR* argv[])
{
system ("color 1f");
int score = 0;
char name, grade;
//input score
cout << "Enter score: ";
cin >> score;
cout << "Enter name: ";
cin >> name;
if (score == 100)
{
cout <<"You received a perfect score (A*) Did You Cheat lol \n";
// 100% is an A. BrainBox
}
elseif ((score >= 85) && (score <= 100))
{
cout << "Your grade is an (A*).\t Great Stuff ! \n";
// 85-100 is an A*.
}
elseif ((score >= 70) && (score <= 84))
{
cout << "Your grade is a just an (A).\t Well done. \n";
// 70-84 is a A.
}
elseif ((score >= 55) && (score <= 69))
{
cout << "Your grade is a (B).\t Not Bad ? \n";
// 55-69 is a B.
}
elseif ((score >= 40) && (score <= 54))
{
cout << "Your grade is a (C).\t Still a pass tho . \n";
// 40-54 is a C.
}
elseif ((score >= 0) && (score <= 39))
{
cout << "You got an F!\t YOU FAIL! GO JOIN THE DOLE QUEUE. \n";
// 0-39 is an F.FAIL
}
_getch();
return 0;
}
#include "stdafx.h"
#include <stdlib.h>
#include <iostream>
#include <conio.h>
#include <iomanip>
#include <math.h>
#include <Windows.h>
usingnamespace std;
int getScore()
{
system ("color 1f");
int score = 0;
char name, grade;
//input score
cout << "Enter score: ";
cin >> score;
cout << "Enter name: ";
cin >> name;
if (score == 100)
{
cout <<"You received a perfect score (A*) Did You Cheat lol \n";
// 100% is an A. BrainBox
}
elseif ((score >= 85) && (score <= 100))
{
cout << "Your grade is an (A*).\t Great Stuff ! \n";
// 85-100 is an A*.
}
elseif ((score >= 70) && (score <= 84))
{
cout << "Your grade is a just an (A).\t Well done. \n";
// 70-84 is a A.
}
elseif ((score >= 55) && (score <= 69))
{
cout << "Your grade is a (B).\t Not Bad ? \n";
// 55-69 is a B.
}
elseif ((score >= 40) && (score <= 54))
{
cout << "Your grade is a (C).\t Still a pass tho . \n";
// 40-54 is a C.
}
elseif ((score >= 0) && (score <= 39))
{
cout << "You got an F!\t YOU FAIL! GO JOIN THE DOLE QUEUE. \n";
// 0-39 is an F.FAIL
}
_getch();
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
getScore(); // call this for each student
}