Untitled
Anonymous
plain_text
11/26/2024 3:07 PM
444 B
16
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