Untitled

 avatar
unknown
plain_text
8 months ago
332 B
3
Indexable
#include <stdio.h>
 
int main() {
 
    int num[100];
    int n=0,pos=0;
    for(int i=0;i<100;i++)
    {
        scanf("%d",&num[i]);
    }
    for( int j=0;j<100;j++)
    {
        if(num[j]>n)
        {
            n = num[j];
            pos = j+1;
        }
    }
    printf("%d\n",n);
    printf("%d\n",pos);
 
    return 0;
}
Editor is loading...
Leave a Comment