Home > Back-end >  With an array of statistics fail to pass the exam
With an array of statistics fail to pass the exam

Time:06-03

8.4

CodePudding user response:

A very simple,
To define a space of 40 array, and then let the user input the value of all the students, with the scanf input into the array, then use a for loop to judge whether the value of all pass, fail an I + 1, the final output I,
Finally, don't expect others to give you the finished program directly,

CodePudding user response:

 # include & lt; Stdio. H> 
Int main ()
{
int a[10];
Int I=0, jg=0, BJG=0;
for(i=0; i<10; I++) {
The scanf (" % d ", & amp; A [I]);
If (a [I] <60)
Bjg++;
Else if (a [I] & gt;=60 & amp; & A [I]
=100)Jg++;
The else
Printf (" please enter a valid value;" );
}
Printf (" in the exam is: % d, failing to % d ", jg, BJG);
}

I also am new scholars, I try to write, you can refer to see,,

CodePudding user response:

Thank you ~ we learn the function?? Ha, ha, ha, also is the use if statements

CodePudding user response:

I don't know the main function calls that return value zha return, then he didn't write clear?? Have a slight slight

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related