#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
const int Grade1 = 0 ; 29;
const int Grade2 = 30 ; 39;
const int Grade3 = 40 ; 69;
const int Grade4 = 70 ; 100;
int Grade ;
int i = 0 ;
while (i < 100)
{
cout << "Enter Students Grade" ;
cin >> Grade ;
if ( Grade >= 0 && Grade < 29)
cout << Grade1 << "*";
else if (Grade >= 30 && Grade < 39)
cout <<Grade2 << "*";
else if (Grade >= 40 || Grade < 69)
cout << Grade3 << "*";
else (Grade >= 70 || Grade < 100)
; cout << Grade4 << "*";
;
}
i++;
return 177;
}
Basically i cant get the const int grade1,2,3,4 to be like 0-29 i dont no what to put in between to seprate them because its supposed to be 0 to 29 and the 30 to 39 after entering this i want is to count the grade and show a table at the end of the program
0-29 ***
30-39 *****
40-69 ********
70-100 ****
stars would be representing how many students got a grade in between them or equavilant.. need help pleasee