fork download
  1. #include <stdio.h>
  2.  
  3. void main() {
  4. int num, a, max;
  5. printf("Enter First Number: ");
  6. scanf("%d", &num);
  7. max = num;
  8. for (a = 1; a <= 9; a++) {
  9. printf("Enter Next Number: ");
  10. scanf("%d", &num);
  11. if (max < num)
  12. max = num;
  13. }
  14. printf("Largest = %d\n", max);
  15. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
Enter First Number: Enter Next Number: Enter Next Number: Enter Next Number: Enter Next Number: Enter Next Number: Enter Next Number: Enter Next Number: Enter Next Number: Enter Next Number: Largest = 5322