vendredi 19 novembre 2021

calculate the percentage of students score between b- and b+ in a class

does anyone know how to do this??? This is what I have tried to do but the result does not look the same and what should I use to solve this problem should I use for repetition or do ...while repetition.

#include <iostrem>
using namespace std;
int main()
{
int total;
double n, m;
double mt = m*total;

for(total = 0; total <= 0; total++){

cout << "enter student number :  \n";
cin >> n;
total= total + n;
cout << "enter the student marks :  \n";
cin >> m;

if(m >= 70 && m <= 74)
    mt = mt +1;
else if(m >= 65 && m <= 69)
    mt = mt +1;
else if(m >= 60 && m <= 64)
    mt = mt +1;
else
    cout << "print \n";
}
return 0;
}

Aucun commentaire:

Enregistrer un commentaire