Take a very close look at the conditions: if (90<=num1 && num1<=100)
If num1 is 85, what happens? Is that what you expect?
If num1 is 90, what happens? Is that what you expect?
If num1 is 95, what happens? Is that what you expect?
If num1 is 100, what happens? Is that what you expect?
If num1 is 105, what happens? Is that what you expect?
if the numbers are written as follow in the file : 89 79 69...how can the program read the space and ignore it , in other words , how can we use cin.ignore() and cin.get() here??
if the numbers are written as follow in the file : 89 79 69...how can the program read the space and ignore it , in other words , how can we use cin.ignore() and cin.get() here??
Since you've declared your variables (g1, g2, and g3) as "int" when pulling the number into the data stream it shouldn't be taking the spaces since it will only accept numbers. It should be ignoring it already.
percentile_average==(g1+g2+g3)/3;
Also, "==" isn't want you want to be using here. You need just the single "=" to assign "percentile_average" the value being calculated. It will also be showing up as a decimal, so you need to multiply it by 100 in order for "percentile_average" to hold the value since it is declared as an "int" not "float".