Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int n, i, d, maior=-1;
- while( scanf("%d",&n) == 1 ){
- for(i = 1; i<=n; i++){
- scanf("%d", &d);
- if( d > maior){
- maior = d;
- }
- }
- if(maior < 10){
- printf("1\n");
- }
- if(maior >= 10 && maior < 20){
- printf("2\n");
- }
- else{
- printf("3\n");
- }
- maior = -1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement