Write a program with a loop that lets the user enter a serie
Write a program with a loop that lets the user enter a series of integer. The users should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.
Solution
As per given, in this program I am using do-while loop to to get the result. The C code of the given problem is given below:
#include<stdio.h>
 int main()
 {
 int num,i,large;
 num=0;
 large=num;
 printf( \"Enter the Integers <-99 to quit> :\") ;
do
 {
 scanf(\"%d\", &num) ;
if ( num > large )
 large = num ;
} while ( num!=-99 ) ;
printf(\"The greatest Number you enteres is %d\ \", large) ;
}

