fork download
  1. #include <stdio.h>
  2.  
  3. int main (void)
  4. {
  5.  
  6. int a[10] = {0};
  7. int max = 0;
  8. for (int i = 0; i < 10; i++)
  9. {
  10. scanf("%d",&a[i]);
  11. }
  12. for (int s = 0; s < 10; s++)
  13. {
  14. if (max < a[s])
  15. {
  16. max = a[s];
  17. }
  18. }
  19. printf("Maximum Number is: %d", max);
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 2116KB
stdin
9 7 2 8 11 992 128 112 2 8
stdout
Maximum Number is: 992