criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		
		Scanner scan = new Scanner(System.in);
		final String END = "_";
		int shuffle;
		int replace;
		String word, str;
		
		while (scan.hasNext()) {
			
			
			if (word.equals(END)) break;
			
			shuffle = scan.nextInt();
			
			for (int i = 0; i < shuffle; i++) {
				replace = scan.nextInt();
				str = word.substring(0, replace);
				word = word.replaceFirst(str, "");
				word += str;
				
			}
			
			System.out.println(word);
			
		} 
		
		scan.close();
		
	}
}



Compiler output:
Main.java:15: error: variable word might not have been initialized
			if (word.equals(END)) break;
			    ^
1 error
Language: Java

import java.util.Scanner;

public class Shuffle {
	public static void main(String [] args) {
		
		Scanner scan = new Scanner(System.in);
		final String END = "_";
		int shuffle;
		int replace;
		String word, str;
		
		do {
			word = scan.next();
			shuffle = scan.nextInt();
			
			for (int i = 0; i < shuffle; i++) {
				replace = scan.nextInt();
				str = word.substring(0, replace);
				word = word.replaceFirst(str, "");
				word += str;
				
			} 
			
			System.out.println(word);
			
		} while (word.equals(END) == false );
		
		scan.close();
		
	}
}



Compiler output:
Main.java:3: error: class Shuffle is public, should be declared in a file named Shuffle.java
public class Shuffle {
       ^
1 error
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String args[]) {
	Scanner scanner = new Scanner(System.in);
	boolean Judge = true;
  	String end = "-";
  	String work;
  	
  	
  	while( Judge || scanner.hasnext ){
		String deck = scanner.next();		//最初の文字
		int shuffle = scanner.nextInt();	//シャッフル回数
  		//終わる処理
  		if( deck.equals(end) ){
  			Judge = false;
  		}

  	/*	//シャッフル
  		for( int i = 0; i < shuffle ; i ++ ) {
			int num = scanner.nextInt();	//シャッフル開始位置
			String substr = deck.substring(0, num);
			work = deck.replaceFirst(substr, "");
			deck = work.concat(substr);
  		}
*/
  	  	//結果出力
  		System.out.println(deck);
  	}
  	
	
  	//後処理
	scanner.close();
  }
}


Compiler output:
Main.java:11: error: cannot find symbol
  	while( Judge || scanner.hasnext ){
  	                       ^
  symbol:   variable hasnext
  location: variable scanner of type Scanner
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner (System.in);
		final String END = "_";
		String word, str;
		int m, h;
		
		while (true) {
			
			word = scan.next();
			if (word.equals(END)) break;
			
			m = scan.nextInt();
			
			for (int i = 0; i < m; i++) {
				h = scan.nextInt();
				str = word + word;
				int hh = h + word.length();
				word = str.substring(h, (h + hh);
			}
			
			System.out.println(word);
			
		}
		
		scan.close();
		
	}
}



Compiler output:
Main.java:21: error: ')' or ',' expected
				word = str.substring(h, (h + hh);
				                                ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner (System.in);
		final String END = "_";
		String word = "a", str;
		int m, h;
		
		while (true) {
			
			
			
			for (int i = 0; i < 2; i++) {
				h = scan.nextInt();
				str = word + word;
				int hh = h + word.length();
				word = str.substring(h, hh);
			}
			
			System.out.println(word);
			
		}
		
		scan.close();
		
	}
}



Compiler output:
Main.java:25: error: unreachable statement
		scan.close();
		^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner (System.in);
		final String END = "_";
		String word = "aabc", str;
		int m, h;
		
		while (true) {
			
			
			
			for (int i = 0; i < 2; i++) {
				h = scan.nextInt();
				str = word + word;
				int hh = h + word.length();
				word = str.substring(h, hh);
			}
			
			System.out.println(word);
			
		}
		
		scan.close();
		
	}
}



Compiler output:
Main.java:25: error: unreachable statement
		scan.close();
		^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner (System.in);
		final String END = "_";
		String word = "aabc", str;
		int h;
		
		while (true) {
			
			
			
			for (int i = 0; i < 2; i++) {
				h = scan.nextInt();
				str = word + word;
				int hh = h + word.length();
				word = str.substring(h, hh);
			}
			
			System.out.println(word);
			
		}
		
		scan.close();
		
	}
}



Compiler output:
Main.java:25: error: unreachable statement
		scan.close();
		^
1 error
Language: Java

import java.util.Scanner;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        while(true)
        {
            String str = sc.next();
            while(true)
            {
                String s = sc.next();
                if(s=="-")
                    break;
                n=Integer.parseInt(s);
                String str2;
                str2 = str.substring(0,n);
                str.delete(0,n);
                str.append(str2);
            }
        }
    }
}



Compiler output:
Main.java:15: error: cannot find symbol
                n=Integer.parseInt(s);
                ^
  symbol:   variable n
  location: class Main
Main.java:17: error: cannot find symbol
                str2 = str.substring(0,n);
                                       ^
  symbol:   variable n
  location: class Main
Main.java:18: error: cannot find symbol
                str.delete(0,n);
                             ^
  symbol:   variable n
  location: class Main
Main.java:19: error: cannot find symbol
                str.append(str2);
                   ^
  symbol:   method append(String)
  location: variable str of type String
4 errors
Language: Java

import java.util.Scanner;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        end:
        while(true)
        {
            String str = sc.next();
            while(true)
            {
                String s = sc.next();
                if(s=="-")
                    break end;
                n=Integer.parseInt(s);
                String str2;
                str2 = str.substring(0,n);
                str.delete(0,n);
                str.append(str2);
            }
        }
    }
}



Compiler output:
Main.java:16: error: cannot find symbol
                n=Integer.parseInt(s);
                ^
  symbol:   variable n
  location: class Main
Main.java:18: error: cannot find symbol
                str2 = str.substring(0,n);
                                       ^
  symbol:   variable n
  location: class Main
Main.java:19: error: cannot find symbol
                str.delete(0,n);
                             ^
  symbol:   variable n
  location: class Main
Main.java:20: error: cannot find symbol
                str.append(str2);
                   ^
  symbol:   method append(String)
  location: variable str of type String
4 errors
Language: Java

import java.util.Scanner;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        boolean brake = false;
        while(true)
        {
            if(!brake){
            String str = sc.next();
            while(true)
            {
                String s = sc.next();
                if(s=="-")
                    {
                        brake = true;
                        break;
                    }
                n=Integer.parseInt(s);
                String str2;
                str2 = str.substring(0,n);
                str.delete(0,n);
                str.append(str2);
            }
        }
        }
    }
}



Compiler output:
Main.java:21: error: cannot find symbol
                n=Integer.parseInt(s);
                ^
  symbol:   variable n
  location: class Main
Main.java:23: error: cannot find symbol
                str2 = str.substring(0,n);
                                       ^
  symbol:   variable n
  location: class Main
Main.java:24: error: cannot find symbol
                str.delete(0,n);
                             ^
  symbol:   variable n
  location: class Main
Main.java:25: error: cannot find symbol
                str.append(str2);
                   ^
  symbol:   method append(String)
  location: variable str of type String
4 errors
Language: Java

import java.util.*;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        boolean brake = false;
        while(true)
        {
            if(!brake){
            String str = sc.next();
            while(true)
            {
                String s = sc.next();
                if(s=="-")
                    {
                        brake = true;
                        break;
                    }
                n=Integer.parseInt(s);
                String str2;
                str2 = str.substring(0,n);
                str.delete(0,n);
                str.append(str2);
            }
        }
        }
    }
}




Compiler output:
Main.java:21: error: cannot find symbol
                n=Integer.parseInt(s);
                ^
  symbol:   variable n
  location: class Main
Main.java:23: error: cannot find symbol
                str2 = str.substring(0,n);
                                       ^
  symbol:   variable n
  location: class Main
Main.java:24: error: cannot find symbol
                str.delete(0,n);
                             ^
  symbol:   variable n
  location: class Main
Main.java:25: error: cannot find symbol
                str.append(str2);
                   ^
  symbol:   method append(String)
  location: variable str of type String
4 errors
Language: Java

import java.util.*;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        boolean brake = false;
        while(true)
        {
            if(!brake){
            String str = sc.next();
            while(true)
            {
                String s = sc.next();
                if(s=="-")
                    {
                        brake = true;
                        break;
                    }
                int n = Integer.parseInt(s);
                String str2;
                str2 = str.substring(0,n);
                str.delete(0,n);
                str.append(str2);
            }
        }
        }
    }
}



Compiler output:
Main.java:24: error: cannot find symbol
                str.delete(0,n);
                   ^
  symbol:   method delete(int,int)
  location: variable str of type String
Main.java:25: error: cannot find symbol
                str.append(str2);
                   ^
  symbol:   method append(String)
  location: variable str of type String
2 errors
Language: Java

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String str;
        while(true){
            str = sc.next();
            if (str.charAt(0)==('-'))
                break;

            int n = sc.nextInt();

            for (int i = 0; i < n; i++) {
                int h = sc.nextInt();
                String a = str.substring(0, h);
                String b = str.substring(h);
                str = b + a;
            }
            System.out.println(str);
        }
    }
}



Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.awt.print.Printable;
import java.util.Scanner;
import javax.sound.midi.SysexMessage;
  
public class Main{      
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(true){
            String str = sc.next();
            if(str=="-")
                break;
            int num = sc.nextInt();
            for(int i=0;i<num;i++)
            {
                int count=sc.nextInt();
                String str1=str.substring(0,count);
                String str2=str.substring(count,str.length());
                str = str1 + str2;
            }
        }  
        System.out.println(str);    
    }   
}


Compiler output:
Main.java:21: error: cannot find symbol
        System.out.println(str);    
                           ^
  symbol:   variable str
  location: class Main
1 error
Language: Java

import java.awt.print.Printable;
import java.util.Scanner;
import javax.sound.midi.SysexMessage;
  
public class Main{      
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = new String();
        while(true){
             = sc.next();
            if(str=="-")
                break;
            int num = sc.nextInt();
            for(int i=0;i<num;i++)
            {
                int count=sc.nextInt();
                String str1=str.substring(0,count);
                String str2=str.substring(count,str.length());
                str = str1 + str2;
            }
        }  
        System.out.println(str);    
    }   
}


Compiler output:
Main.java:10: error: illegal start of expression
             = sc.next();
             ^
1 error
Language: C

#include <stdio.h> 
 #include <string.h> 
 
 
 int main(){ 
     int m, h; 
     char cards[256], temp[256], result[256]; 
     int i, j=0, len; 
 
 
     while(1){ 
         scanf("%s", cards); 
         len=strlen(cards); 
         if(strcmp(cards, "-")==0&&len==1)break; 
         scanf("%d", &m); 
         for(;m>0;m--){ 
             scanf("%d", &h); 
             strcpy(temp, cards); 
             for(i=0;i<h;i++){ 
                 cards[len-h+i]=temp[i]; 
             } 
             for(i=0;i<len-h;i++){ 
                 cards[i]=temp[i+h]; 
             } 
         } 
         for(i=0;i<len;i++){ 
             result[j++]=cards[i]; 
         } 
         result[j++]='\n'; 
     } 
     result[j]='\0'; 
     printf("%s", result); 
 
 
     return 0; 


Compiler output:
main.c: In function 'main':
main.c:35:6: error: expected declaration or statement at end of input
   35 |      return 0;
      |      ^~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
 int i,b,j,k,len;

 char a[200],sub[200];
 
 for(i=0;scanf("%s",&a)==-;i++){
                                len=strlen(a);
                                scanf("%d",&b);
                                for(j=0;j<b;j++){
                                                 scanf("%d",&c);
                                                 for(k=0;k<c;k++)sub[k]=a[k];
                                                 for(k=c;k<len;k++)a[k-c]=a[k];
                                                 for(k=c;k<len;k++)a{k]=sub[k-c];
                                                 }
                                 printf("%s",a);
                                }
 return 0;

}



Compiler output:
main.c: In function 'main':
main.c:9:27: error: expected expression before ';' token
    9 |  for(i=0;scanf("%s",&a)==-;i++){
      |                           ^
main.c:13:62: error: 'c' undeclared (first use in this function)
   13 |                                                  scanf("%d",&c);
      |                                                              ^
main.c:13:62: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:69: error: expected ';' before '{' token
   16 |                                                  for(k=c;k<len;k++)a{k]=sub[k-c];
      |                                                                     ^
      |                                                                     ;
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
 int i,b,j,k,len,c;

 char a[200],sub[200];
 
 for(i=0;scanf("%s",a)==-;i++){
                                len=strlen(a);
                                scanf("%d",&b);
                                for(j=0;j<b;j++){
                                                 scanf("%d",&c);
                                                 for(k=0;k<c;k++)sub[k]=a[k];
                                                 for(k=c;k<len;k++)a[k-c]=a[k];
                                                 for(k=c;k<len;k++)a{k]=sub[k-c];
                                                 }
                                 printf("%s",a);
                                }
 return 0;

}



Compiler output:
main.c: In function 'main':
main.c:9:26: error: expected expression before ';' token
    9 |  for(i=0;scanf("%s",a)==-;i++){
      |                          ^
main.c:16:69: error: expected ';' before '{' token
   16 |                                                  for(k=c;k<len;k++)a{k]=sub[k-c];
      |                                                                     ^
      |                                                                     ;
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
 int i,b,j,k,len,c;

 char a[200],sub[200];
 
 for(;;){
         scanf("%s",a);
         if(strcmp(a,'-')==0)break;
                                len=strlen(a);
                                scanf("%d",&b);
                                for(j=0;j<b;j++){
                                                 scanf("%d",&c);
                                                 for(k=0;k<c;k++)sub[k]=a[k];
                                                 for(k=c;k<len;k++)a[k-c]=a[k];
                                                 for(k=c;k<len;k++)a{k]=sub[k-c];
                                                 }
                                 printf("%s",a);
                                }
 return 0;

}



Compiler output:
main.c: In function 'main':
main.c:11:22: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   11 |          if(strcmp(a,'-')==0)break;
      |                      ^~~
      |                      |
      |                      int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:18:69: error: expected ';' before '{' token
   18 |                                                  for(k=c;k<len;k++)a{k]=sub[k-c];
      |                                                                     ^
      |                                                                     ;
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
 int i,b,j,k,len,c;

 char a[200],sub[200];
 
 for(;;){
         scanf("%s",a);
         if(strcmp(a,'-')==0)break;
                                len=strlen(a);
                                scanf("%d",&b);
                                for(j=0;j<b;j++){
                                                 scanf("%d",&c);
                                                 for(k=0;k<c;k++)sub[k]=a[k];
                                                 for(k=c;k<len;k++)a[k-c]=a[k];
                                                 for(k=len-x;k<len;k++)a{k]=sub[k-(len-x)];
                                                 }
                                 printf("%s",a);
                                }
 return 0;

}



Compiler output:
main.c: In function 'main':
main.c:11:22: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   11 |          if(strcmp(a,'-')==0)break;
      |                      ^~~
      |                      |
      |                      int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:18:60: error: 'x' undeclared (first use in this function)
   18 |                                                  for(k=len-x;k<len;k++)a{k]=sub[k-(len-x)];
      |                                                            ^
main.c:18:60: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:73: error: expected ';' before '{' token
   18 |                                                  for(k=len-x;k<len;k++)a{k]=sub[k-(len-x)];
      |                                                                         ^
      |                                                                         ;
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
 int i,b,j,k,len,c;

 char a[200],sub[200];
 
 for(;;){
         scanf("%s",a);
         if(strcmp(a,'-')==0)break;
                                len=strlen(a);
                                scanf("%d",&b);
                                for(j=0;j<b;j++){
                                                 scanf("%d",&c);
                                                 for(k=0;k<c;k++)sub[k]=a[k];
                                                 for(k=c;k<len;k++)a[k-c]=a[k];
                                                 for(k=len-c;k<len;k++)a{k]=sub[k-(len-c)];
                                                 }
                                 printf("%s",a);
                                }
 return 0;

}



Compiler output:
main.c: In function 'main':
main.c:11:22: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   11 |          if(strcmp(a,'-')==0)break;
      |                      ^~~
      |                      |
      |                      int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:18:73: error: expected ';' before '{' token
   18 |                                                  for(k=len-c;k<len;k++)a{k]=sub[k-(len-c)];
      |                                                                         ^
      |                                                                         ;
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
 int i,b,j,k,len,c;

 char a[200],sub[200];
 
 for(;;){
         scanf("%s",a);
         if(strcmp(a,'-')==0)break;
                                len=strlen(a);
                                scanf("%d",&b);
                                for(j=0;j<b;j++){
                                                 scanf("%d",&c);
                                                 for(k=0;k<c;k++)sub[k]=a[k];
                                                 for(k=c;k<len;k++)a[k-c]=a[k];
                                                 for(k=len-c;k<len;k++)a{k]=sub[k-(len-c)];
                                                 }
                                 printf("%s\n",a);
       }
 return 0;

}



Compiler output:
main.c: In function 'main':
main.c:11:22: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   11 |          if(strcmp(a,'-')==0)break;
      |                      ^~~
      |                      |
      |                      int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:18:73: error: expected ';' before '{' token
   18 |                                                  for(k=len-c;k<len;k++)a{k]=sub[k-(len-c)];
      |                                                                         ^
      |                                                                         ;
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
 int i,b,j,k,len,c;

 char a[200],sub[200];
 
 for(;;){
         scanf("%s",a);
         if(strcmp(a,"-")==0)break;
                                len=strlen(a);
                                scanf("%d",&b);
                                for(j=0;j<b;j++){
                                                 scanf("%d",&c);
                                                 for(k=0;k<c;k++)sub[k]=a[k];
                                                 for(k=c;k<len;k++)a[k-c]=a[k];
                                                 for(k=len-c;k<len;k++)a{k]=sub[k-(len-c)];
                                                 }
                                 printf("%s\n",a);
       }
 return 0;

}


 




Compiler output:
main.c: In function 'main':
main.c:18:73: error: expected ';' before '{' token
   18 |                                                  for(k=len-c;k<len;k++)a{k]=sub[k-(len-c)];
      |                                                                         ^
      |                                                                         ;
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
    int n,shuffle;
    char str[500];
    char tmp;
    while(1){
        for(int i=0; i<500; i++){
            str[i] = '\0';
        }
        scanf("%s",str);
        if(!strcmp(str,"-")){
            break;
        }
        scanf("%d",&n);
        for(int i=0; i<n; i++){
            scanf("%d",&shffle);
            for(int j=0; j<shffle; j++){
                tmp = str[0];
                for(int k=0; k<strlen(str)-1; k++){
                    str[k] = str[k+1];
                }
                str[strlen(str)-1] = tmp;
            }
        }
        printf("%s\n",str);
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:25: error: 'shffle' undeclared (first use in this function); did you mean 'shuffle'?
   17 |             scanf("%d",&shffle);
      |                         ^~~~~~
      |                         shuffle
main.c:17:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
int main(void){
   char cards[201],sub[200];
   int i,m,h,len;
		while(scanf("%s",cards),strcmp(cards,"-")
	{
       scanf("%d", &m);
       len = strlen(cards);
       for(i = 0; i< m; i++) {
           scanf("%d", &h);
           strcpy(sub, &cards[h]);
           strcat(sub, cards);
           sub[len] = '\0';
           strcpy(cards,sub);
       }
       printf("%s\n",cards);
   }
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:58: error: expected ')' before '{' token
    6 |                 while(scanf("%s",cards),strcmp(cards,"-")
      |                      ~                                   ^
      |                                                          )
    7 |         {
      |         ~                                                 
main.c:20:1: error: expected expression before '}' token
   20 | }
      | ^
Language: C

#include<iostream>
#include<string>

using namespace std;
int main(){
  string str;
  cin >> str;
  int i;
  int m,j;
  while(str!="-"){
    cin >> m;
    for(i=0;i<m;i++){
      cin >> j;
      str=str.substr(j,str.size()-j)+str.substr(0,j);
    }
    cout << str << endl;
    cin >> str;
  }
   
}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<string>

using namespace std;
int main(){
  string str;
  cin >> str;
  int i;
  int m,j;
  while(str!="-"){
    cin >> m;
    for(i=0;i<m;i++){
      cin >> j;
      str=str.substr(j,str.size()-j)+str.substr(0,j);
    }
    cout << str << endl;
    cin >> str;
  }
return 0;

}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<string>

using namespace std;
int main(void){
  string str;
  cin >> str;
  int i;
  int m,j;
  while(str!="-"){
    cin >> m;
    for(i=0;i<m;i++){
      cin >> j;
      str=str.substr(j,str.size()-j)+str.substr(0,j);
    }
    cout << str << endl;
    cin >> str;
  }
return 0;

}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<string>

using namespace std;
int main(void){
  string str;
  cin >> str;
  int i;
  int a,b;

  while(str!="-"){
    cin >> a;
    for(i=0;i<a;i++){
      cin >> b;
      str=str.substr(b,str.size()-b)+str.substr(0,b);
    }
    cout << str << endl;
    cin >> str;
  }
  
}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <string.h> //文字列操作


int main () {
	char str[201]; //最後null文字入るからね
	int shu_time,shu_cont;
	int i,j,k;
	int tmp;
	
	for (i = 0;i < 10;i ++) {
		scanf ("%s",&str);
		if (strcmp (str,"-")  == 0) {
			break;
		}
		
		scanf ("%d",&shu_time); //シャッフル回数   
		for (j  = 0;j < shu_time;j ++) {
			scanf ("%d",&shu_cont); //shuffle_content 前から何枚後ろに
            while (shu_cont) {
            	tmp = str[0]; 
            	for (k = 1;k < strlen (str) ;k ++) { //strの中身をスライドします
            		str[k-1] = str[k];
            	}
            	str[strlen (str) - 1] = tmp;
                shu_cont --;	
            }
			
		}
		
		for (l = 0;l < strlen (str) ;l ++) {
			printf ("%c",str[l]);
		}
		putchar ('\n');
	}
	
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:31:22: error: 'l' undeclared (first use in this function)
   31 |                 for (l = 0;l < strlen (str) ;l ++) {
      |                      ^
main.c:31:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
  /*shuffle回数:m,shuffle枚数配列:ch[]*/
  char card[200];
  char stor1[200];
  char stor2[200];
  int m;
  int ih[200];
  char ch[200];
  
  while(1){
    scanf("%s",card);
    scanf("%d",&m);
    for(int i=0;i<m;i++){
      scanf("%c",&ch[i]);
    }
    if(ch=='_'){
      break;
    }
    for(int i=0;i<m;i++){
      ih[i]=ch[i]-0;
    }
  }
  for(int i=0;i<m;i+){
    strncpy(stor1[0],card[i],ih[i]);
    strncpy(stor2[0],card[0],(strlen(card)-ih[i]));
    strcat(stor1,stor2)
  }
  printf("%s\n",stor1);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:10: warning: comparison between pointer and integer
   19 |     if(ch=='_'){
      |          ^~
main.c:26:21: error: expected expression before ')' token
   26 |   for(int i=0;i<m;i+){
      |                     ^
main.c:27:18: error: passing argument 1 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
   27 |     strncpy(stor1[0],card[i],ih[i]);
      |             ~~~~~^~~
      |                  |
      |                  char
In file included from main.c:2:
/usr/include/string.h:144:40: note: expected 'char * restrict' but argument is of type 'char'
  144 | extern char *strncpy (char *__restrict __dest,
      |                       ~~~~~~~~~~~~~~~~~^~~~~~
main.c:27:26: error: passing argument 2 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
   27 |     strncpy(stor1[0],card[i],ih[i]);
      |                      ~~~~^~~
      |                          |
      |                          char
/usr/include/string.h:145:46: note: expected 'const char * restrict' but argument is of type 'char'
  145 |                       const char *__restrict __src, size_t __n)
      |                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:28:18: error: passing argument 1 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
   28 |     strncpy(stor2[0],card[0],(strlen(card)-ih[i]));
      |             ~~~~~^~~
      |                  |
      |                  char
/usr/include/string.h:144:40: note: expected 'char * restrict' but argument is of type 'char'
  144 | extern char *strncpy (char *__restrict __dest,
      |                       ~~~~~~~~~~~~~~~~~^~~~~~
main.c:28:26: error: passing argument 2 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
   28 |     strncpy(stor2[0],card[0],(strlen(card)-ih[i]));
      |                      ~~~~^~~
      |                          |
      |                          char
/usr/include/string.h:145:46: note: expected 'const char * restrict' but argument is of type 'char'
  145 |                       const char *__restrict __src, size_t __n)
      |                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:29:24: error: expected ';' before '}' token
   29 |     strcat(stor1,stor2)
      |                        ^
      |                        ;
   30 |   }
      |   ~
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
  /*shuffle回数:m,shuffle枚数配列:ch[]*/
  char card[200];
  char stor1[200];
  char stor2[200];
  int m;
  int ih[200];
  char ch[200];
  
  while(1){
    scanf("%s",card);
    scanf("%d",&m);
    for(int i=0;i<m;i++){
      scanf("%c",&ch[i]);
    }
    if(ch=='_'){
      break;
    }
    for(int i=0;i<m;i++){
      ih[i]=ch[i]-0;
    }
  }
  for(int i=0;i<m;i++){
    strncpy(stor1[0],card[i],ih[i]);
    strncpy(stor2[0],card[0],(strlen(card)-ih[i]));
    strcat(stor1,stor2)
  }
  printf("%s\n",stor1);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:10: warning: comparison between pointer and integer
   19 |     if(ch=='_'){
      |          ^~
main.c:27:18: error: passing argument 1 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
   27 |     strncpy(stor1[0],card[i],ih[i]);
      |             ~~~~~^~~
      |                  |
      |                  char
In file included from main.c:2:
/usr/include/string.h:144:40: note: expected 'char * restrict' but argument is of type 'char'
  144 | extern char *strncpy (char *__restrict __dest,
      |                       ~~~~~~~~~~~~~~~~~^~~~~~
main.c:27:26: error: passing argument 2 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
   27 |     strncpy(stor1[0],card[i],ih[i]);
      |                      ~~~~^~~
      |                          |
      |                          char
/usr/include/string.h:145:46: note: expected 'const char * restrict' but argument is of type 'char'
  145 |                       const char *__restrict __src, size_t __n)
      |                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:28:18: error: passing argument 1 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
   28 |     strncpy(stor2[0],card[0],(strlen(card)-ih[i]));
      |             ~~~~~^~~
      |                  |
      |                  char
/usr/include/string.h:144:40: note: expected 'char * restrict' but argument is of type 'char'
  144 | extern char *strncpy (char *__restrict __dest,
      |                       ~~~~~~~~~~~~~~~~~^~~~~~
main.c:28:26: error: passing argument 2 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
   28 |     strncpy(stor2[0],card[0],(strlen(card)-ih[i]));
      |                      ~~~~^~~
      |                          |
      |                          char
/usr/include/string.h:145:46: note: expected 'const char * restrict' but argument is of type 'char'
  145 |                       const char *__restrict __src, size_t __n)
      |                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:29:24: error: expected ';' before '}' token
   29 |     strcat(stor1,stor2)
      |                        ^
      |                        ;
   30 |   }
      |   ~
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
  char card[200];
  int shufflenum;
  char cshuffle[200];
  int ishuffle[200];
  int strnum;
  char shuffle1[200];
  char shuffle2[200];
  while(1){
    scanf("%s",card);
    scanf("%d",&shufflenum);
    for(int i=0;i<shufflenum;i++){
      scanf("%c",cshuffle[i]);
    }
    if(cshuffle=='_'){
      break;
    }
    for(int i=0;i<shufflenum;i++){
      ishuffle[i]=cshuffle[i]-'0';
    }
    strnum=strlen(card);
    for(int i=0,int j=(strnum-ishuffle[i]);i<(strnum-(strnum-ishuffle[i]));i++,j++){
      strncpy(shuffle1,card,(strnum-ishuffle[i]));
      strncpy(shuffle2,card,ishuffle[j];)
    }
    card=strcat(shuffle2,shuffle1);
    printf("%s",card);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:16: warning: comparison between pointer and integer
   18 |     if(cshuffle=='_'){
      |                ^~
main.c:25:17: error: expected identifier or '(' before 'int'
   25 |     for(int i=0,int j=(strnum-ishuffle[i]);i<(strnum-(strnum-ishuffle[i]));i++,j++){
      |                 ^~~
main.c:25:80: error: 'j' undeclared (first use in this function)
   25 |     for(int i=0,int j=(strnum-ishuffle[i]);i<(strnum-(strnum-ishuffle[i]));i++,j++){
      |                                                                                ^
main.c:25:80: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:40: error: expected ')' before ';' token
   27 |       strncpy(shuffle2,card,ishuffle[j];)
      |              ~                         ^
      |                                        )
main.c:27:42: error: expected ';' before '}' token
   27 |       strncpy(shuffle2,card,ishuffle[j];)
      |                                          ^
      |                                          ;
   28 |     }
      |     ~                                     
main.c:29:9: error: assignment to expression with array type
   29 |     card=strcat(shuffle2,shuffle1);
      |         ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
  char card[200];
  int shufflenum;
  char cshuffle[200];
  int ishuffle[200];
  int strnum;
  char shuffle1[200];
  char shuffle2[200];
  int i,j;
  while(1){
    scanf("%s",card);
    scanf("%d",&shufflenum);
    for(i=0;i<shufflenum;i++){
      scanf("%c",cshuffle[i]);
    }
    if(cshuffle=='_'){
      break;
    }
    for(i=0;i<shufflenum;i++){
      ishuffle[i]=cshuffle[i]-'0';
    }
    strnum=strlen(card);
    for(i=0,j=(strnum-ishuffle[i]);i<(strnum-(strnum-ishuffle[i]));i++,j++){
      strncpy(shuffle1,card,(strnum-ishuffle[i]));
      strncpy(shuffle2,card,ishuffle[j];)
    }
    card=strcat(shuffle2,shuffle1);
    printf("%s",card);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:16: warning: comparison between pointer and integer
   19 |     if(cshuffle=='_'){
      |                ^~
main.c:28:40: error: expected ')' before ';' token
   28 |       strncpy(shuffle2,card,ishuffle[j];)
      |              ~                         ^
      |                                        )
main.c:28:42: error: expected ';' before '}' token
   28 |       strncpy(shuffle2,card,ishuffle[j];)
      |                                          ^
      |                                          ;
   29 |     }
      |     ~                                     
main.c:30:9: error: assignment to expression with array type
   30 |     card=strcat(shuffle2,shuffle1);
      |         ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
  char card[200];
  int shufflenum;
  char cshuffle[200];
  int ishuffle[200];
  int strnum;
  char shuffle1[200];
  char shuffle2[200];
  int i,j;
  while(1){
    scanf("%s",card);
    scanf("%d",&shufflenum);
    for(i=0;i<shufflenum;i++){
      scanf("%c",cshuffle[i]);
    }
    if(cshuffle=='_'){
      break;
    }
    for(i=0;i<shufflenum;i++){
      ishuffle[i]=cshuffle[i]-'0';
    }
    strnum=strlen(card);
    for(i=0,j=(strnum-ishuffle[i]);i<(strnum-(strnum-ishuffle[i]));i++,j++){
      strncpy(shuffle1,card,(strnum-ishuffle[i]));
      strncpy(shuffle2,card,ishuffle[j]);
    }
    card=strcat(shuffle2,shuffle1);
    printf("%s",card);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:16: warning: comparison between pointer and integer
   19 |     if(cshuffle=='_'){
      |                ^~
main.c:30:9: error: assignment to expression with array type
   30 |     card=strcat(shuffle2,shuffle1);
      |         ^
Language: C

#include <cstdio>
#include <cstring>

int main(void)
{
	string word, ans;
	int n, i;


	while(scanf("%s", word)!=EOF && word!='-'){
		scanf("%d", &n);

		ans = word;
		for(i=0;i<n;i++){
			scanf("%d", &h);
			ans = ans.substr(h+1,) + ans.substr(0, h);
		}

		printf("%s\n", ans);
	}

	return 0;
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void)
{
  char n[200]; //??¬???
  int sha; //?????£??????????????°
  int h; //?????£????????????????????°
  int i,j,k; //????????????
  int num = 0;//????????°
  int temp; //

  while(1){
    scanf("%s",&n); //??????????????????????????????
    if(n[0] == '-'){ //???????????????
      break;
    }
    for(num = 0; num < 200; num ++){  //????????°????????????
      if(n[num] == '\0'){ //null????????????????????¬??¨????????????
	break;
      }
    }
    scanf("%d",&sha); //?????£??????????????°????¢????
    for(i=0; i<sha; i++){ //sha????????°??°?????????
      scanf("%d",&h); //?????£????????????????????°????¢????
      for(j=0; j<h; j++){ //?????£????????????????????°????????°?????????
	temp = n[0]; //n[0]?????????
	for(k=0; k<num; k++){ //????????°?????°?????????
	  h[k] = h[k+1]; //?????????????????????
	}
	h[num-1] = temp; //???????????????n[0]?????£??????????????\??????
      }
    }
  }
  printf("%s\n",&n);
  
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:28:12: error: subscripted value is neither array nor pointer nor vector
   28 |           h[k] = h[k+1]; //?????????????????????
      |            ^
main.c:28:19: error: subscripted value is neither array nor pointer nor vector
   28 |           h[k] = h[k+1]; //?????????????????????
      |                   ^
main.c:30:10: error: subscripted value is neither array nor pointer nor vector
   30 |         h[num-1] = temp; //???????????????n[0]?????£??????????????\??????
      |          ^
Language: C

#include<stdio.h>
#include<string.h>

int main(void){
int count[100]={0};
char raw[200];
int i,k;
int len;
char tmp;

while(1){
scanf("%s",raw);
if(raw=='-')
break;
len==strlen(raw);
scanf("%d",n);
for(i=0;i<n;i++){
scanf("%d",count[i]);
for(k=0;k<count[i];k++){
tmp=raw[0+k];
raw[0+k]=raw[len-k];
raw[len-k]=tmp;
}
}printf("%s\n",raw);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:7: warning: comparison between pointer and integer
   13 | if(raw=='-')
      |       ^~
main.c:16:12: error: 'n' undeclared (first use in this function)
   16 | scanf("%d",n);
      |            ^
main.c:16:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include <stdio.h>

void shuffle(char *st)
{
	char ch;
	ch = *st;

	while (*(st + 1)) {
		*st = *(st + 1);
		st++;
	}

	*st = ch;
}

int main(void)
{
	char a[201];
	int h, i, m, j;

	while (1) {
		scanf("%s\n", a);
		if (a[0] == '-')	break;
		scanf("%d", &m);
		for (i = 0; i < m; i++) {
			scanf("%d", &h);
			for (j = 0; j < h; j++)
				shuffle(a);
		}
		printf("%s\n", a);
	}

	return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:22:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   22 |                 scanf("%s\n", a);
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:22:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   22 |                 scanf("%s\n", a);
      |                 ^~~~~
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:28:33: error: implicit declaration of function 'shuffle' [-Wimplicit-function-declaration]
   28 |                                 shuffle(a);
      |                                 ^~~~~~~
main.c:30:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   30 |                 printf("%s\n", a);
      |                 ^~~~~~
main.c:30:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:30:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:30:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
#include <string.h>

int main(){
    int m, h;
    char cards[256], temp[256], result[256];
    int i, j=0, len;

    while(1){
        scanf("%s", cards);//??\???
        len=strlen(cards);//???????????????
        if(strcmp(cards, "-")==0&&len==1)break;//???????????????
        scanf("%d", &m);//?????£??????????????°
        
	for(;m>0;m--){
            scanf("%d", &h);//????????????????????°
            strcpy(temp, cards);//?????´
            for(i=0;i<h;i++){
                cards[len-h+i]=temp[i];// 255 a 
            }
            for(i=0;i<len-h;i++){	
                cards[i]=temp[i+h];	//a a b c?????????a
            }
        }

        for(i=0;i<len;i++){???????????????
            result[j++]=cards[i];      //a a b c   a
        }
        result[j++]='\n';
    }
    result[j]='\0';
    printf("%s", result);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:28: error: expected expression before '?' token
   26 |         for(i=0;i<len;i++){???????????????
      |                            ^
Language: C

#include <stdio.h>
#include <string.h>
int main(void){
  char w[410],c[201];
  int m,h,l;
  while(1){
    scanf("%s",w);
    if(strcmp(w,"-")==0)
      break;
    l=strlen(w);
    scanf("%d",&m);
    while(m--){
      scanf("%d",&h);
      strcat(w,w);
      strncpy(c,w+h,l);
      memset(w,0,sizeof(w));
      strncpy(w,c,l);
      memser(c,0,sizeof(c));
    }
    printf("%s\n",w);
  } 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:7: error: implicit declaration of function 'memser'; did you mean 'memset'? [-Wimplicit-function-declaration]
   18 |       memser(c,0,sizeof(c));
      |       ^~~~~~
      |       memset
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

int main(){
  char ch[201],end[2];
  end='-';
  char **moji;
  int i,j,n,m,leng;
  while(1){
    scanf(" %s",ch);
    if(!strcmp(ch,end)) break;
    scanf(" %d",&m);
    leng=strlen(ch);
    moji=malloc(m*sizeof(char *));
    for(i=0;i<m;i++) moji[i]=malloc((leng+1)*sizeof(char));
    for(i=0;i<m;i++){
      scanf(" %d",&n);
      if(i==0){
         for(j=0;j<leng;j++){
           if(j<n) moji[i][j+leng-n]=ch[j];
           else moji[i][j-n]=ch[j];}
      else{
        for(j=0;j<leng;j++){
           if(j<n) moji[i][j+leng-n]=moji[i-1][j];
           else moji[i][j-n]=moji[i-1][j];}
      moji[i][leng]='\0'}
    printf("%s\n",moji[m-1]);}
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:7:6: error: assignment to expression with array type
    7 |   end='-';
      |      ^
main.c:23:7: error: expected '}' before 'else'
   23 |       else{
      |       ^~~~
main.c:27:25: error: expected ';' before '}' token
   27 |       moji[i][leng]='\0'}
      |                         ^
      |                         ;
main.c:29:3: error: expected declaration or statement at end of input
   29 |   return 0;}
      |   ^~~~~~