first of all, im german so excuse my mistakes, if there are any :)
so i got to write a code where the user can put in grades, and the program can tell you the number for each grade, f.e:
Grades: 1 2 3 4 5 6
quantity: 2 3 6 3 4 1
I can do that all, it's not very hard, but my only problem is, how do i control, what the user put in?
my idea is, i have 6 variables and every time he inserts a 3, the variable for the number of 3's, counts one more.
here is the part of the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
int main()
{
int Anz1;
int Anz2;
int Anz3;
int Anz4;
int Anz5;
cout>>"Bitte geben sie die Noten von 1 bis 5 ein, maximal 38 Noten.">>
if ( "INPUT" == 1)
{
Anz1 + 1;
}
|
What i only need to know is, what do i have to put in there, where "INPUT" stands yet. it's just a placeholder, because i dont know what to put there
we didnt learn it yet and i dont find any good suggestions.
help!