Submission #1821010


Source Code Expand

Copy
#include <stdio.h>
int main(void)
{
    int t[8];
    for(int p=0;p<8;p++)
    {
        scanf("%d",&t[p]);
    }
    int ans=0;
    for(int q=0;q<8;q++)
    {
        if(t[p]>ans)
          ans=t[p];
    }
    printf("%d",ans);
}

Submission Info

Submission Time
Task A - Time Penalty
User Altair626
Language C (GCC 5.4.1)
Score 0
Code Size 247 Byte
Status CE

Compile Error

./Main.c: In function ‘main’:
./Main.c:12:14: error: ‘p’ undeclared (first use in this function)
         if(t[p]>ans)
              ^
./Main.c:12:14: note: each undeclared identifier is reported only once for each function it appears in
./Main.c:7:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&t[p]);
         ^