Skip to content

Instantly share code, notes, and snippets.

@pinglunliao
Last active November 5, 2019 08:44
Show Gist options
  • Save pinglunliao/130c62d10a37c7444377 to your computer and use it in GitHub Desktop.
Save pinglunliao/130c62d10a37c7444377 to your computer and use it in GitHub Desktop.
#include <cmath>
#include <cstdio>
using namespace std;
int main(void){
int num = 0;
float score = 0;
double average = 0.0;
while(scanf("%d", &num) != EOF)
{
average = 0.0;
for(int i = 1; i <= num; i++)
{
scanf("%f", &score);
average += (score / num);
//printf("average:%lf\n", average);
}
if( average > 59)
printf("no\n");
else
printf("yes\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment