Student Grades

Write your question here.





Here is what I have , I need to get Students to input there Name And Score > and for me to output the grade.
This works but it is very messy I want to tidy this up so I can see all the names and grades when the program finishes.


#include "stdafx.h"
#include "stdafx.h"
#include <conio.h>
#include <iostream>
#include <stdlib.h>
#include <string>

using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{

float grade, pass,fail,count;
int mark;
string name;
double total;
grade = 0;
pass = 0;
fail = 0;
count = 0;

while (true)
{
cout<<"Enter name ";
cout<<"Enter mark ";
cin>> name;
cin >> mark;

if(mark >=85 && mark <=100 )
{
cout <<"\n\n\t You Received An (A*) Well Done";
}
else if ( mark >=70 && mark <=84)
{
cout <<"\n\n\t You Received An (A) Well Done";
}
else if ( mark >=50 && mark <70)
cout <<"\n\n\t You Received An (B) Not To Bad";
}
if ( mark >=40 && mark <55)
{
cout <<"\n\n\t You Received An (C) Close One";
}
else if ( mark <40)
{
cout <<"\n\n\t You Received An (FAIL) Unlucky";
}

cout << name << "\n\n\t And your grade is ";



_getch();
return 0;
}
Topic archived. No new replies allowed.