fork(1) download
  1. #include <stdio.h>
  2. #define N 40
  3. int main(void)
  4. {
  5. int i, n, fail, score[N];
  6. printf("How many students?");
  7. scanf("%d", &n);
  8. for (i=0; i<n; i++)
  9. {
  10. scanf("%d", &score[i]);
  11. }
  12. for (i=0;i<n;i++){
  13. if (score [i]<60){
  14. fail++;}
  15. }
  16. printf ("%d",fail);
  17. return 0;
  18. }
Success #stdin #stdout 0s 544KB
stdin
3 68 64 12
stdout
How many students?-796756863