#include <stdio.h> void main() { int num, a, max; printf("Enter First Number: "); scanf("%d", &num); max = num; for (a = 1; a <= 9; a++) { printf("Enter Next Number: "); scanf("%d", &num); if (max < num) max = num; } printf("Largest = %d\n", max);}
Standard input is empty
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
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!