Home > Back-end >  Beg you, take with me. No. Girls it is too difficult to learn
Beg you, take with me. No. Girls it is too difficult to learn

Time:01-07

CodePudding user response:

Very simple small program, for your reference
 
#include
using namespace std;

Const int MAX=10;

Void test01 ()
{
Int arr (MAX)={0}, count=0;
Cout & lt; <"Said by input students examination result, 1 or 2 said failed" & lt; for (int i=0; I & lt; MAX. I++)
{
Cin & gt;> Arr [I];
If (arr [I]==1)
count++;
}

Cout & lt; <"Through the students:" & lt; If (count & gt; 8)
Cout & lt; <"Easy" & lt;
}

Void test02 ()
{
Int arr (MAX)={0}, count=0, avge=0, sum=0;

for (int i=0; I & lt; MAX. I++)
{
Cout & lt; <"Enter the first" & lt; Cin & gt;> Arr [I];
The sum +=arr [I];
If (arr [I] & gt;=60)
count++;
}

Cout & lt; <"Pass the student number:" & lt; Cout & lt; <"Average." & lt; }

Int main ()
{
Test02 ();

system("pause");
return 0;
}
  • Related