r1-0.c
#include <stdio.h>
int main(void)
{
int max,min,x,i,j;
max=0;
min=99999;
while(1){
scanf("%d",&x);
if(x==0) break;
if(x>max){
max=x;
}
if(x<min){
min=x;
}
}
printf("%d\n",max);
printf("%d\n",min);
return(0);
}
#include <stdio.h>
int main(void)
{
int max,min,x,i,j;
max=0;
min=99999;
while(1){
scanf("%d",&x);
if(x==0) break;
if(x>max){
max=x;
}
if(x<min){
min=x;
}
}
printf("%d\n",max);
printf("%d\n",min);
return(0);
}