Untitled
unknown
plain_text
a year ago
332 B
6
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