写的很糙
#include <iostream>
using namespace std;
int main()
{
int score[5] = { 60,45,81,59,75 };
int i = 0, j = 0;
for (i = 0; i < 5; i++)
{
if (*(score + i) < 60)
{
cout << "第" << i + 1 << "个不及格,分数是" << *(score + i) << endl;
j++;
}
}
cout << "\n共有" << j << "个不及格" << endl;
}