Submission #524624


Source Code Expand

Copy
#include<stdio.h>
#include<string.h>
main(){
  char s[101];
  int i,j;
  for(i=0;i<100;i++){
  scanf("%s",&s[i]);
    if(s[i]=='L'){
      printf("< ",s[i]);
    }else{
      if(s[i]=='R'){
        printf("> ",s[i]);
      }else{
        if(s[i]=='A'){
          printf("A ",s[i]);
        }
      }
    }
    for(i<=j;j<100;j++){
      if(s[i]=\0)
  }
  printf("\n",s[101]);

  return 0;
}

Submission Info

Submission Time
Task A - スペース高橋君
User ky33
Language C (GCC 4.9.2)
Score 0
Code Size 414 Byte
Status

Compile Error

./Main.c: In function ‘main’:
./Main.c:9:7: warning: too many arguments for format [-Wformat-extra-args]
       printf("< ",s[i]);
       ^
./Main.c:12:9: warning: too many arguments for format [-Wformat-extra-args]
         printf("> ",s[i]);
         ^
./Main.c:15:11: warning: too many arguments for format [-Wformat-extra-args]
           printf("A ",s[i]);
           ^
./Main.c:20:7: error: stray ‘\’ in program
       if(s[i]=\0)
       ^
./Main.c:21:3: error: expected expression before ‘}’ token
   }
   ^
./Main.c:22:3: warning: too many arguments for format [-Wformat-extra-args]
   printf("\n",s[101]);
   ^
./Main.c:25:1: error: expected declaration or statement at end of input
 }
 ^
./Main.c:7:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s",&s[i]);
   ^