pvjc22/du2/program.c

25 lines
347 B
C
Raw Normal View History

2022-03-08 14:34:11 +00:00
#include <stdio.h>
2022-03-09 12:53:51 +00:00
#define VELKOST_POLA 50
2022-03-08 14:34:11 +00:00
int main(){
2022-03-09 12:53:51 +00:00
int results[VELKOST_POLA];
2022-03-08 14:34:11 +00:00
int max;
2022-03-09 12:53:51 +00:00
//int value = 0;
2022-03-08 14:34:11 +00:00
int i = 0;
2022-03-09 12:53:51 +00:00
int a = 0;
2022-03-08 14:34:11 +00:00
while(1){
2022-03-09 12:53:51 +00:00
int value = 0;
int r = scanf("%d",&value);
if (r == 1){
results[i] = value;
max = results[0];
if(max < results[i])
max = results[i];
i++;
}else{
break;
}
}
2022-03-08 14:34:11 +00:00
return 0;
}