fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int b=0,i,a[5];
  6. float x;
  7. for(i=0;i<=4;i++) scanf("%d",&a[i]);
  8. for(i=0;i<=4;i++) b+=a[i];
  9. x=(float)b/5;
  10. for(i=0;i<=4;i++)
  11. {
  12. if(i>=x)
  13. printf("%d",a[i]);
  14. }
  15. printf("\n");
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5308KB
stdin
1 1 1 1 2
stdout
112