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

<?php

$kw = array('the', 'this', 'that');
while (TRUE) {
    $s = rtrim(fgets(STDIN));
    if (feof(STDIN)) {
        break;
    }
    for ($i = 0; $i < 26; $i++) {
        $words = explode(' ', str_replace('.', '', $s));
        foreach ($kw as $v) {
            if (in_array($v, $words)) {
                echo $s . PHP_EOL;
                continue 3;
            }
        }
        for ($j = 0; $j < strlen($s); $j++) {
            if ($s[$j] < 'a' || $s[$j] > 'z') {
                continue;
            }
            if ($s[$j] === 'z') {
                $s[$j] = 'a';
            } else {
                $s[$j] = chr(ord($s[$j]) + 1);
            }
        }
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
<?php
^
Main.java:3: error: unclosed character literal
$kw = array('the', 'this', 'that');
            ^
Main.java:3: error: unclosed character literal
$kw = array('the', 'this', 'that');
                ^
Main.java:3: error: unclosed character literal
$kw = array('the', 'this', 'that');
                   ^
Main.java:3: error: unclosed character literal
$kw = array('the', 'this', 'that');
                        ^
Main.java:3: error: unclosed character literal
$kw = array('the', 'this', 'that');
                           ^
Main.java:3: error: unclosed character literal
$kw = array('the', 'this', 'that');
                                ^
Main.java:4: error: class, interface, enum, or record expected
while (TRUE) {
^
Main.java:6: error: class, interface, enum, or record expected
    if (feof(STDIN)) {
    ^
Main.java:8: error: class, interface, enum, or record expected
    }
    ^
Main.java:9: error: class, interface, enum, or record expected
    for ($i = 0; $i < 26; $i++) {
                 ^
Main.java:9: error: class, interface, enum, or record expected
    for ($i = 0; $i < 26; $i++) {
                          ^
Main.java:10: error: empty character literal
        $words = explode(' ', str_replace('.', '', $s));
                                               ^
Main.java:11: error: class, interface, enum, or record expected
        foreach ($kw as $v) {
        ^
Main.java:14: error: class, interface, enum, or record expected
                continue 3;
                ^
Main.java:15: error: class, interface, enum, or record expected
            }
            ^
Main.java:17: error: class, interface, enum, or record expected
        for ($j = 0; $j < strlen($s); $j++) {
                     ^
Main.java:17: error: class, interface, enum, or record expected
        for ($j = 0; $j < strlen($s); $j++) {
                                      ^
Main.java:20: error: class, interface, enum, or record expected
            }
            ^
Main.java:23: error: class, interface, enum, or record expected
            } else {
            ^
Main.java:25: error: class, interface, enum, or record expected
            }
            ^
21 errors
Language: Java

import java.io.*;
import java.util.Scanner;

public class CaesarChipher {
	
	public static String decode (String str) {
		
		String ret = "";
		
		for (int i = 1; i <= 25; i++) {
			boolean flag = false;
			for (String s : str.split(" ")) {
				if (s.charAt(s.length() - 1) == '.')
					s = s.substring(0,s.length() - 1);
				String temp = "";
				for (int j = 0; j < s.length(); j++)
					temp += (char)((str.charAt(j) - 'a' + i) % 26 + 'a');
				if (temp.matches("the|that|this"))
					flag = true;
				ret += temp;
			}
			if (flag) {
				return ret;
			}
			ret = "";
		}
		
		return null;
	}
	
	public static void main (String[] args) throws IOException {
		
		Scanner sc = new Scanner(System.in);
		
		while (sc.hasNext()) {
			String str = sc.nextLine();
			if (str == null) break;
			System.out.println(decode(str));
		}
		
	}
	
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Pattern;


public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern ptr = Pattern.compile("this|that|the");
		String str;

		while((str=br.readLine())!=null){
			char charArray[] = str.toCharArray();

			for(int i=0; !ptr.matcher(String.valueOf(charArray)).find() & i<26; i++){
				for(int j=0; j<charArray.length; j++){
					if('a'<=charArray[j] && charArray[j] < 'z'){
						charArray[j]++;
					}else if(charArray[j]=='z'){
						charArray[j] = 'a';
					}
				}
			}
			System.out.println(charArray);
		}
	}

Compiler output:
Main.java:27: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Pattern;


public class CaesarChipher {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern ptr = Pattern.compile("this|that|the");
		String str;

		while((str=br.readLine())!=null){
			char charArray[] = str.toCharArray();

			for(int i=0; !ptr.matcher(String.valueOf(charArray)).find() & i<26; i++){
				for(int j=0; j<charArray.length; j++){
					if('a'<=charArray[j] && charArray[j] < 'z'){
						charArray[j]++;
					}else if(charArray[j]=='z'){
						charArray[j] = 'a';
					}
				}
			}
			System.out.println(charArray);
		}
	}
}

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

import java.util.*;

public class Main {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
        
        ArrayList<String> strlist = new ArrayList<String>();
        
        while (scanner.hasNext()) {
            strlist.add(scanner.next());
        }
        
        int number = calcNumber(strlist);
        
        StringBuilder decoded = decode(strlist, number);
        
        System.out.printa(decoded);
      
        
    }
  
    public static int calcNumber(ArrayList<String> strlist) {
        HashMap<Integer, Integer> count = new HashMap<Integer, Integer>();
        int number = 0;
        int maxCount = 0;
        
        
        for (String word : strlist) {
            if (word.length() == 3 || word.length() == 4) {
                char first = word.charAt(0);
                int diff = 't' - first;
         
                int counter = 1;
                if (count.containsKey(diff)) {
                    counter = count.get(diff) + 1;
                }
                count.put(diff, counter);
                if (counter > maxCount) {
                    maxCount = counter;
                    number = diff;
                }
            }
        }
        return number;
    }
    
    public static StringBuilder decode(ArrayList<String> strlist, int number) {
        StringBuilder decoded = new StringBuilder();
        
        for (String word : strlist) {
            for (int i = 0; i < word.length(); i++) {
                char c = word.charAt(i);
                if ( c != '.') {
                    c += number;
                }
                decoded.append(c);
            }
            decoded.append(" ");
        }
        decoded.deleteCharAt(decoded.length()-1);
        return decoded;
    }

}

Compiler output:
Main.java:17: error: cannot find symbol
        System.out.printa(decoded);
                  ^
  symbol:   method printa(StringBuilder)
  location: variable out of type PrintStream
1 error
Language: C

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

int main(int argc, char *argv[]) {
	int i;
	char s[80];
	while(gets(s)!=EOF){
	for(i=0;i<=79;i++){
		if(s[i]=='\0'){
			break;
		}
		if(isalpha(s[i])!=false){	
		s[i]-=4;
	}
	}
	puts(s); 
	return 0;
}
}


Compiler output:
main.c: In function 'main':
main.c:9:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |         while(gets(s)!=EOF){
      |               ^~~~
      |               fgets
main.c:14:35: error: 'false' undeclared (first use in this function)
   14 |                 if(isalpha(s[i])!=false){
      |                                   ^~~~~
main.c:5:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    4 | #include <stdlib.h>
  +++ |+#include <stdbool.h>
    5 | 
main.c:14:35: note: each undeclared identifier is reported only once for each function it appears in
   14 |                 if(isalpha(s[i])!=false){
      |                                   ^~~~~
Language: C

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

//#define DEBUG 1
#define LENGTH 81

char shift_char(char in);

main()
{
	char input[LENGTH];
	int flag = 1;
	gets(input);
	int i, j;
	while(gets(input) != \0)
	{
		while(1)
		{
			if(strstr(input, "the") != NULL || strstr(input, "that") != NULL || strstr(input, "this") != NULL)
			{
				break;
			}
			for(i = 0; i < strlen(input); i++)
			{
				if(islower(input[i]) != 0)
				{
					input[i] = shift_char(input[i]);
				}
			}
		}
	}
	printf("%s", input);
	return 0;
}

char shift_char(char in)
{
	in = in + 1;
	if(in == '{') 
	{
		in = in - 26;
	}
	return in;
}

Compiler output:
main.c:10:1: error: return type defaults to 'int' [-Wimplicit-int]
   10 | main()
      | ^~~~
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   14 |         gets(input);
      |         ^~~~
      |         fgets
main.c:16:30: error: stray '\' in program
   16 |         while(gets(input) != \0)
      |                              ^
main.c:26:36: error: implicit declaration of function 'islower' [-Wimplicit-function-declaration]
   26 |                                 if(islower(input[i]) != 0)
      |                                    ^~~~~~~
main.c:4:1: note: include '<ctype.h>' or provide a declaration of 'islower'
    3 | #include <math.h>
  +++ |+#include <ctype.h>
    4 |
Language: C

#include<string.h>
 
int main(void){
    int i, j, flag, offset;
    int lenstr;
 
    char str[100];
 
    for(i = 0 ; i < 100; i++){
            str[i] = 0;
        }
 
    while(fgets(str, 100, stdin) != NULL){
        lenstr = strlen(str);
        flag = 0;
        for(i = 0; i < lenstr; i++){
            if(str[i]>str[i+1]){
                if((str[i]-str[i+1])=='t'-'h'){
                    flag = 1;
                }
            }else if(str[i]<str[i+1]){
                if((str[i]+26)-str[i+1]=='t'-'h'){
                    flag = 1;
                }
            }
 
            if(flag){
                if((str[i] - 't')>=0){
                    offset = str[i] - 't';
                } else if((str[i] - 't')<0){
                    offset = str[i] - 't' + 26;
                }
                for(j = 0; j < lenstr; j++){
                    if(str[j] == ' ' || str[j] == ',' || str[j] == '.' || str[j] == '\n') continue;
                    str[j] = str[j] - offset;
                }
                break;
            }
        }

		if(strstr(str,"the") != NULL || strstr(str,"this") != NULL || strstr(str,"that") != NULL)
			printf("%s\n", str);

		for(i = 0 ; i < 100; i++){
            str[i] = 0;
        }
    }
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:11: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
   13 |     while(fgets(str, 100, stdin) != NULL){
      |           ^~~~~
main.c:13:27: error: 'stdin' undeclared (first use in this function)
   13 |     while(fgets(str, 100, stdin) != NULL){
      |                           ^~~~~
main.c:2:1: note: 'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
    1 | #include<string.h>
  +++ |+#include <stdio.h>
    2 | 
main.c:13:27: note: each undeclared identifier is reported only once for each function it appears in
   13 |     while(fgets(str, 100, stdin) != NULL){
      |                           ^~~~~
main.c:42:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   42 |                         printf("%s\n", str);
      |                         ^~~~~~
main.c:42:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:42:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:42:25: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>


int main(){

    int n,i,j,flag,t;

    char s[81],ans[81],tmp[81];
    

    scanf("%s",s);

    for(i=0,n=0,flag=0;i<26;i++){
    	for(j=0;s[j]!='\0';j++){
    		if(!('a'<=s[j]&&s[j]<='z')){
    			if(tmp[0]=='t'&&tmp[1]=='h'
    				&&((tmp[2]=='e'&&n==3)
    				||(tmp[2]=='i'&&tmp[3]=='s'&&n==4)
    				||(tmp[2]=='a'&&tnp[3]=='t'&&n==4))){
    				flag=1;
    				break;
    			}
    			n=0;
    		}else{
    			t=s[j]+i;
    			if('a'<=t&&t<='z'){
    				tmp[n]=t;
    			}else{
    				t-='z';
    				tmp[n]=t+'a'-1;
    			}
    		}
    	}
    	if(flag)break;
    }

    if(flag){
    	//?????????
    	for(j=0;s[j]!='\0';j++){
    		t=s[j]+i;
    		if('a'<=t&&t<='z'){
    			ans[j]=t;
    		}else{
    			t-='z';
    			ans[j]=t+'a'-1;
    		}
    	}
    	ans[j]='\0';
    	printf("%s\n",ans);
    

    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:19:49: error: 'tnp' undeclared (first use in this function); did you mean 'tmp'?
   19 |                                 ||(tmp[2]=='a'&&tnp[3]=='t'&&n==4))){
      |                                                 ^~~
      |                                                 tmp
main.c:19:49: note: each undeclared identifier is reported only once for each function it appears in
main.c:54:1: error: expected declaration or statement at end of input
   54 | }
      | ^
Language: C

#include<stdio.h>


int main(){

    int n,i,j,flag,t;

    char s[81],ans[81],tmp[81];
    

    scanf("%s",s);

    for(i=0,n=0,flag=0;i<26;i++){
    	for(j=0;s[j]!='\0';j++){
    		if(!('a'<=s[j]&&s[j]<='z')){
    			if(tmp[0]=='t'&&tmp[1]=='h'
    				&&((tmp[2]=='e'&&n==3)
    				||(tmp[2]=='i'&&tmp[3]=='s'&&n==4)
    				||(tmp[2]=='a'&&tmp[3]=='t'&&n==4))){
    				flag=1;
    				break;
    			}
    			n=0;
    		}else{
    			t=s[j]+i;
    			if('a'<=t&&t<='z'){
    				tmp[n]=t;
    			}else{
    				t-='z';
    				tmp[n]=t+'a'-1;
    			}
    		}
    	}
    	if(flag)break;
    }

    if(flag){
    	//?????????
    	for(j=0;s[j]!='\0';j++){
    		t=s[j]+i;
    		if('a'<=t&&t<='z'){
    			ans[j]=t;
    		}else{
    			t-='z';
    			ans[j]=t+'a'-1;
    		}
    	}
    	ans[j]='\0';
    	printf("%s\n",ans);
    

    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:54:1: error: expected declaration or statement at end of input
   54 | }
      | ^
Language: C

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

int main()
{
    char a[85],i;

    while(gets(a)!=NULL)
    {
        for(i=0;a[i]!='\0';i++)
        {
            if(a[i]>=101&&a[i]<=123)
                a[i]=a[i]-4;
            else if(a[i]<=100&&a[i]>=97)
                a[i]=a[i]+23;
            else
                a[i]=a[i];

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

    }

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |     while(gets(a)!=NULL)
      |           ^~~~
      |           fgets
main.c:9:18: warning: comparison between pointer and integer
    9 |     while(gets(a)!=NULL)
      |                  ^~
Language: C


#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
    char s[128];
    int i,j,k;
    int c;
    while((gets(s))!=NULL){
        c=1;
        for(i=0;i<26;i++){
            for(j=0;j<strlen(s);j++){
                if(isalpha(s[j])){
                    if(s[j]=='z'){
                        s[j]='a';
                    }else{
                        s[j]++;
                    }
                }
            }
            for(k=0;k<strlen(s)-1;k++){
                if((s[k]=='t')&&(s[k+1]=='h')){
                    if(c){
                        c=0;
                        printf("%s\n",s);
                    }
                }
            }
        }
    }
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:12: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   10 |     while((gets(s))!=NULL){
      |            ^~~~
      |            fgets
main.c:10:20: warning: comparison between pointer and integer
   10 |     while((gets(s))!=NULL){
      |                    ^~
Language: C

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

int main()
{
    char s[81];
    int i;
    while(gets(s)){
        for(i=0; i<strlen(s); i++){
            if(s[i]>='a' && s[i]<='z')
                s[i]-=4;
        }
        puts(s);
    }
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:8:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |     while(gets(s)){
      |           ^~~~
      |           fgets
Language: C


#include <stdio.h>
#include<string.h>
int main()
{
    char a[200];
    int i,b,x,l,c,in;
    while(gets(a)!=EOF)
    {
        l=strlen(a);
         b=(int)a[0];
         x=116-b;
        for(i=0;i<l;i++)
        {
            if(a[i]>=97&&a[i]<=122)
            {
                in=(int)a[i];
                a[i]=in+x;

            }
            printf("%c",a[i]);
        }
        printf("\n");
    }
}



Compiler output:
main.c: In function 'main':
main.c:8:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |     while(gets(a)!=EOF)
      |           ^~~~
      |           fgets
Language: C


#include <stdio.h>
#include<string.h>
int main()
{
    char a[200];
    int i,b,x,l,c,in;
    while(gets(a)!=EOF)
    {
        l=strlen(a);
         b=(int)a[0];
         x=116-b;
        for(i=0;i<l;i++)
        {
            if(a[i]>=97&&a[i]<=122)
            {
                in=(int)a[i];
                a[i]=in+x;
                }
            printf("%c",a[i]);
        }
        printf("\n");}
        return 0;

}



Compiler output:
main.c: In function 'main':
main.c:8:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |     while(gets(a)!=EOF)
      |           ^~~~
      |           fgets
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
int i,l;
char ch[90];
while(gets(ch)){
l=strlen(ch);
for(i=0;i<l;i++){
if(ch[i]>='a'&&ch[i]<='z'){

if(ch[i]=='a'||ch[i]=='b'||ch[i]=='c'||ch[i]=='d'){
if(ch[i]=='a'){
ch[i]='w';

}
else if(ch[i]=='b'){
ch[i]='x';

}
else if(ch[i]=='c'){
ch[i]='y';

}

else if(ch[i]=='d'){
ch[i]='z';
}

}
else {
ch[i]=ch[i]-4;
}
}
}
printf("%s\n",ch);


}
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:7: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 | while(gets(ch)){
      |       ^~~~
      |       fgets
Language: C

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


int main(void){

  char x[100];
  int i;


  while(scanf("%[a-z .]", x)!=EOF){
    getchar();

    while(1){
      if(strstr(x, " the ")!=NULL || trstr(x, " this ")!=NULL || trstr(x, " that ")!=NULL){
	break;
      }
      
      for(i=0; i<strlen(x)-1; i++){
	if(x[i]==' ')i++;
	
	x[i]++;
	if(x[i]>'z') x[i]='a';
	
      }
      
    }

    printf("%s\n", x);
    memset(x, '\0', 100);

  }
  return(0);
}



Compiler output:
main.c: In function 'main':
main.c:15:38: error: implicit declaration of function 'trstr'; did you mean 'strstr'? [-Wimplicit-function-declaration]
   15 |       if(strstr(x, " the ")!=NULL || trstr(x, " this ")!=NULL || trstr(x, " that ")!=NULL){
      |                                      ^~~~~
      |                                      strstr
main.c:15:56: warning: comparison between pointer and integer
   15 |       if(strstr(x, " the ")!=NULL || trstr(x, " this ")!=NULL || trstr(x, " that ")!=NULL){
      |                                                        ^~
main.c:15:84: warning: comparison between pointer and integer
   15 |       if(strstr(x, " the ")!=NULL || trstr(x, " this ")!=NULL || trstr(x, " that ")!=NULL){
      |                                                                                    ^~
Language: C

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


int main(void){

  char x[100];
  int i;


  while(gets(x)!=NULL){
   
    while(1){
      if(strstr(x, " the ")!=NULL || strstr(x, " this ")!=NULL || strstr(x, " that ")!=NULL){
	break;
      }
      
      for(i=0; i<strlen(x)-1; i++){
	if(x[i]==' ')i++;
	
	x[i]++;
	if(x[i]>'z') x[i]='a';
	
      }
      
    }

    printf("%s\n", x);
    memset(x, '\0', 100);

  }
  return(0);
}



Compiler output:
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   11 |   while(gets(x)!=NULL){
      |         ^~~~
      |         fgets
main.c:11:16: warning: comparison between pointer and integer
   11 |   while(gets(x)!=NULL){
      |                ^~
Language: C

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


int main(void){

  char x[100];
  int i;


  while(gets(x)!=NULL){
   
    while(1){
      if(strstr(x, " the ")!=NULL || strstr(x, " this ")!=NULL || strstr(x, " that ")!=NULL){
	break;
      }
      
      for(i=0; i<strlen(x); i++){
	if(x[i]!=' ' && x[i]!='.'){	
	  x[i]++;
	}
	if(x[i]>'z') x[i]='a';
	
      }
      
    }

    printf("%s\n", x);

  }
  return(0);
}



Compiler output:
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   11 |   while(gets(x)!=NULL){
      |         ^~~~
      |         fgets
main.c:11:16: warning: comparison between pointer and integer
   11 |   while(gets(x)!=NULL){
      |                ^~
Language: C

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


int main(void){

  char x[100];
  int i;


  while(gets(x)!=NULL){
   
    while(1){
      if(strstr(x, "the")==NULL && strstr(x, "this")==NULL && strstr(x, "that")==NULL){
	
	for(i=0; i<strlen(x); i++){
	  if(x[i]!=' ' && x[i]!='.'){	
	    x[i]++;
	  }
	  if(x[i]>'z') x[i]='a';
	
	}
      }
      else{
	break;
      }
    }
    printf("%s\n", x);

  }
  return(0);
}



Compiler output:
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   11 |   while(gets(x)!=NULL){
      |         ^~~~
      |         fgets
main.c:11:16: warning: comparison between pointer and integer
   11 |   while(gets(x)!=NULL){
      |                ^~
Language: C

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


int main(void){

  char x[100];
  int i;


  while(scanf("%s", x)!=EOF){
    getchar(x);   

    while(1){
      if(strstr(x, "the")==NULL && strstr(x, "this")==NULL && strstr(x, "that")==NULL){
	
	for(i=0; i<strlen(x); i++){
	  if(x[i]!=' ' && x[i]!='.'){	
	    x[i]++;
	  }
	  if(x[i]>'z') x[i]='a';
	
	}
      }
      else{
	break;
      }
    }
    printf("%s\n", x);

  }
  return(0);
}



Compiler output:
main.c: In function 'main':
main.c:12:5: error: too many arguments to function 'getchar'
   12 |     getchar(x);
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: declared here
  582 | extern int getchar (void);
      |            ^~~~~~~
Language: C

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


void Roll(char ch[], int times) {
	int cnt = 0;
	while (ch[cnt] != 0) {
		if (96 < ch[cnt] && 123 > ch[cnt])
			ch[cnt] = (ch[cnt] - 97 + times) % 26 + 97;
		cnt++;
	}
}

int main() {
	char inp[100]; char buff[80];

	int pos = 0, bpos = 0;

	while (1) {
		if (gets_s(inp, 100) == NULL)break;
		while (1) {
			if (96 < inp[pos] && 123 > inp[pos]) {
				buff[bpos] = inp[pos];
				bpos++; pos++;
			}
			else {
				buff[bpos] = '\0';
				if (strlen(buff) != 3 && strlen(buff) != 4) {
					bpos = 0;
					continue;
				}
				Roll(buff, 116 - inp[0]);
				if (strcmp(buff, "this") == 0 || strcmp(buff, "that") == 0 || strcmp(buff, "the") == 0) {
					Roll(inp, 116 - inp[0]);
					break;
				}
				else {
					bpos = 0;
					continue;
				}

			}
		}
		puts(inp);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:21: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
   20 |                 if (gets_s(inp, 100) == NULL)break;
      |                     ^~~~~~
main.c:20:38: warning: comparison between pointer and integer
   20 |                 if (gets_s(inp, 100) == NULL)break;
      |                                      ^~
Language: C

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


void Roll(char ch[], int times) {
	int cnt = 0;
	while (ch[cnt] != 0) {
		if (96 < ch[cnt] && 123 > ch[cnt])
			ch[cnt] = (ch[cnt] - 97 + times) % 26 + 97;
		cnt++;
	}
}

int main() {
	char inp[100]; char buff[80];

	int pos = 0, bpos = 0;

	while (1) {
		if (gets_s(inp, 100) == NULL)break;
		while (1) {
			if (96 < inp[pos] && 123 > inp[pos]) {
				buff[bpos] = inp[pos];
				bpos++; pos++;
			}
			else {
				buff[bpos] = '\0';
				if (strlen(buff) != 3 && strlen(buff) != 4) {
					bpos = 0;
					continue;
				}
				Roll(buff, 116 - inp[0]);
				if (strcmp(buff, "this") == 0 || strcmp(buff, "that") == 0 || strcmp(buff, "the") == 0) {
					Roll(inp, 116 - inp[0]);
					break;
				}
				else {
					bpos = 0;
					continue;
				}

			}
		}
		puts(inp);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:21: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
   21 |                 if (gets_s(inp, 100) == NULL)break;
      |                     ^~~~~~
main.c:21:38: warning: comparison between pointer and integer
   21 |                 if (gets_s(inp, 100) == NULL)break;
      |                                      ^~
Language: C

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


void Roll(char ch[], int times) {
	int cnt = 0;
	while (ch[cnt] != 0) {
		if (96 < ch[cnt] && 123 > ch[cnt])
			ch[cnt] = (ch[cnt] - 97 + times) % 26 + 97;
		cnt++;
	}
}

int main() {
	char inp[100]; char buff[80];

	int pos = 0, bpos = 0;

	while (1) {
		if (gets(inp) == NULL)break;
		while (1) {
			if (96 < inp[pos] && 123 > inp[pos]) {
				buff[bpos] = inp[pos];
				bpos++; pos++;
			}
			else {
				buff[bpos] = '\0';
				if (strlen(buff) != 3 && strlen(buff) != 4) {
					bpos = 0;
					continue;
				}
				Roll(buff, 116 - inp[0]);
				if (strcmp(buff, "this") == 0 || strcmp(buff, "that") == 0 || strcmp(buff, "the") == 0) {
					Roll(inp, 116 - inp[0]);
					break;
				}
				else {
					bpos = 0;
					continue;
				}

			}
		}
		puts(inp);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:21: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   21 |                 if (gets(inp) == NULL)break;
      |                     ^~~~
      |                     fgets
main.c:21:31: warning: comparison between pointer and integer
   21 |                 if (gets(inp) == NULL)break;
      |                               ^~
Language: C

#include "stdio.h"
#include "string.h"

int main(void)
{
	char input[32]={0};
	char strBuff[20][32]={0};
	char length[20]={0};
	int i,j,len,front,ret;
	int strCnt=20;
	int pt;
	int pt2;

	// Input
	for(i = 0; i < 20; i++)
	{
		ret = scanf("%s", &strBuff[i]);
		if(ret > 0)
		{
			length[i] = strlen(input);
		}
		else
		{
			strCnt = i-1;
		}
	}

	// "th" serch
	j = 0;
	front = 0;
	for(i = 0; i < strCnt; i++)
	{
		if((strBuff[0] - strBuff[1]) == 12)
		{
			pt = strBuff[0] - 20;
			if(pt < 0)
			{
				pt = 26 + pt;
			}
		}
	}

	// Fixed String
	do
	{
		for(i = 0; i < length[0]; i++)
		{
			strBuff[0][i] -= pt;
			if(strBuff[0][i] < 97)
			{
				pt2 = 97 - strBuff[0][i];
				strBuff[0][i] = 97 + (26 - pt2);
			}
		}
		printf("%s", strBuff[0]);
		j=1;
	}
	while(j < strCnt)
	{
		for(i = 1; i < length[j]; i++)
		{
			strBuff[j][i] -= pt;
			if(strBuff[j][i] < 97)
			{
				pt2 = 97 - strBuff[j][i];
				strBuff[j][i] = 97 + (26 - pt2);
			}
		}
		printf(" %s", strBuff[j]);
		j++;
	}

	printf("\n");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:35:28: error: assignment to 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   35 |                         pt = strBuff[0] - 20;
      |                            ^
main.c:58:26: error: expected ';' before '{' token
   58 |         while(j < strCnt)
      |                          ^
      |                          ;
   59 |         {
      |         ~
Language: C

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

char Chipher(char c,int n){
  return c+n <= 122 ? c+n : c+n-25;
}

int main(){
  char a[85],b[85];

  while(gets(a) != EOF){
    int i,j,flag;
    flag = 0;
    for(i=0;i<26;i++){
      for(j=0;j<strlen(a);j++){
        if(a[j] == ' ' || a[j] == '.'){ b[j] = a[j];}
        else {b[j] = Chipher(a[j],i);}
      }

      for(j=0;j<strlen(a)-3;j++){
        if((a[j] == 't' && a[j+1] == 'h' && a[j+2] == 'e') ||
          ( a[j] == 't' && a[j+1] == 'h' && a[j+2] == 'i' && a[j+3] == 's') ||
           ( a[j] == 't' && a[j+1] == 'h' && a[j+2] == 'a' && a[j+3] == 't')
           ){flag = 1;}
      }
      j=strlen(a)-3;
      if(a[j] == 't' && a[j+1] == 'h' && a[j+2] == 'e'){flag = 1;}

      if(flag == 1)break;
    }
    b[strlen(a)] = '\0';
    printf("%s\n",b);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   11 |   while(gets(a) != EOF){
      |         ^~~~
      |         fgets
Language: C


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

char Chipher(char c,int n){
  return c+n <= 122 ? c+n : c+n-25;
}

int main(){
  char a[85],b[85];

  while(gets(a) != EOF){
    int i,j,flag;
    flag = 0;
    for(i=0;i<26;i++){
      for(j=0;j <= strlen(a);j++){
        if(a[j] == ' ' || a[j] == '.' || a[j] == '\0'){ b[j] = a[j];}
        else {b[j] = Chipher(a[j],i);}
      }

      for(j=0;j<strlen(a)-3;j++){
        if((b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'e') ||
          ( b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'i' && b[j+3] == 's') ||
           ( b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'a' && b[j+3] == 't')
           ){flag = 1;}
      }
      j=strlen(a)-3;
      if(b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'e'){flag = 1;}

      if(flag == 1){break;}
    }
    printf("%s\n",b);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   13 |   while(gets(a) != EOF){
      |         ^~~~
      |         fgets
Language: C


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

char Chipher(char c,int n){
  return c-n >= 97 ? c-n : 123-(97-(c-n));
}

int main(){
  char a[85],b[85];

  while(gets(a) != EOF){
    int i,j,flag;
    flag = 0;
    for(i=0;i<26;i++){
      for(j=0;j <= strlen(a);j++){
        if(a[j] == ' ' || a[j] == '.' || a[j] == '\0'){ b[j] = a[j];}
        else {b[j] = Chipher(a[j],i);}
      }

      for(j=0;j<strlen(a)-3;j++){
        if((b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'e') ||
          ( b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'i' && b[j+3] == 's') ||
           ( b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'a' && b[j+3] == 't')
           ){flag = 1;}
      }
      j=strlen(a)-3;
      if(b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'e'){flag = 1;}

      if(flag == 1){break;}
    }
    printf("%s\n",b);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   13 |   while(gets(a) != EOF){
      |         ^~~~
      |         fgets
Language: C


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

char Chipher(char c,int n){
  return c-n >= 97 ? c-n : 123-(97-(c-n));
}

int main(){
  char a[85],b[85];

  while(gets(a) != EOF){
    int i,j,flag;
    flag = 0;
    for(i=0;i<26;i++){
      for(j=0;j <= strlen(a);j++){
        if(a[j] == ' ' || a[j] == '.' || a[j] == '\0'){ b[j] = a[j];}
        else {b[j] = Chipher(a[j],i);}
      }

      for(j=0;j<strlen(a)-3;j++){
        if((b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'e') ||
          ( b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'i' && b[j+3] == 's') ||
           ( b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'a' && b[j+3] == 't')
           ){flag = 1;}
      }
      j=strlen(a)-3;
      if(b[j] == 't' && b[j+1] == 'h' && b[j+2] == 'e'){flag = 1;}

      if(flag == 1){break;}
    }
    printf("%s\n",b);
   strcpy(a, "");
   strcpy(b, "");   
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   13 |   while(gets(a) != EOF){
      |         ^~~~
      |         fgets
Language: C

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

int scan(char *str,int max)
{
    int i;
    for(i=0;i<max;i++){
        if(!strncmp(&(str[i]),"this ",5))return 1;
        if(!strncmp(&(str[i]),"that ",5))return 1;
        if(!strncmp(&(str[i]),"the ",4))return 1;
        if(!strncmp(&(str[i]),"this.",5))return 1;
        if(!strncmp(&(str[i]),"that.",5))return 1;
        if(!strncmp(&(str[i]),"the.",4))return 1;
        for(i++;;i++){
            if(str[i] == ' ' || str[i] == '.'){
                break;
            }
        }
    }
    return 0;
}

int main(){
    char in[82];
    int n,i;
    while(gets(in)!=EOF){

    n = strlen(in);

    while(1){
        for(i=0;i<n;i++){
            if(in[i] !=' ' && in[i] != '.'){
                in[i] = in[i] + 1;
                if(in[i] == 'z'+1)in[i] ='a';

            }
        }
        if(scan(in,n))break;
    }
    printf("%s\n",in);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   26 |     while(gets(in)!=EOF){
      |           ^~~~
      |           fgets
Language: C

#include <stdio.h>
#include <string.h>
#define X 90
int scan(char *str,int max)
{
    int i;
    for(i=0;i<max;i++){
        if(!strncmp(&(str[i]),"this ",5))return 1;
        if(!strncmp(&(str[i]),"that ",5))return 1;
        if(!strncmp(&(str[i]),"the ",4))return 1;
        if(!strncmp(&(str[i]),"this.",5))return 1;
        if(!strncmp(&(str[i]),"that.",5))return 1;
        if(!strncmp(&(str[i]),"the.",4))return 1;
        for(i++;;i++){
            if(str[i] == ' ' || str[i] == '.'){
                break;
            }
        }
    }
    return 0;
}

int main(){
    char in[82];
    int n,i;
    while(gets(in,X,stdin)!=EOF){

    n = strlen(in);

    while(1){
        for(i=0;i<n;i++){
            if(in[i] !=' ' && in[i] != '.'){
                in[i] = in[i] + 1;
                if(in[i] == 'z'+1)in[i] ='a';

            }
        }
        if(scan(in,n))break;
    }
    printf("%s\n",in);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   26 |     while(gets(in,X,stdin)!=EOF){
      |           ^~~~
      |           fgets
Language: C

#include <stdio.h>
#include <string.h>
#define X 90
int scan(char *str,int max)
{
    int i;
    for(i=0;i<max;i++){
if(str[i]=='t'){
        if(!strncmp(&(str[i]),"this ",5))return 1;
        if(!strncmp(&(str[i]),"that ",5))return 1;
        if(!strncmp(&(str[i]),"the ",4))return 1;
        if(!strncmp(&(str[i]),"this.",5))return 1;
        if(!strncmp(&(str[i]),"that.",5))return 1;
        if(!strncmp(&(str[i]),"the.",4))return 1;
}
else
        for(i++;;i++){
            if(str[i] == ' ' || str[i] == '.'){
                break;
            }
        }
for(i++;;i++){
            if(str[i] == ' ' || str[i] == '.'){
                break;
    }
    return 0;
}

int main(){
    char in[82];
    int n,i;
    while(gets(in,X,stdin)!=EOF){

    n = strlen(in);

    while(1){
        for(i=0;i<n;i++){
            if(in[i] !=' ' && in[i] != '.'){
                in[i] = in[i] + 1;
                if(in[i] == 'z'+1)in[i] ='a';

            }
        }
        if(scan(in,n))break;
    }
    printf("%s\n",in);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   32 |     while(gets(in,X,stdin)!=EOF){
      |           ^~~~
      |           fgets
main.c: In function 'scan':
main.c:49:1: error: expected declaration or statement at end of input
   49 | }
      | ^
main.c:49:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
#include <string.h>
#define X 90
int scan(char *str,int max)
{
    int i;
    for(i=0;i<max;i++){
if(str[i]=='t'){
        if(!strncmp(&(str[i]),"this ",5))return 1;
        if(!strncmp(&(str[i]),"that ",5))return 1;
        if(!strncmp(&(str[i]),"the ",4))return 1;
        if(!strncmp(&(str[i]),"this.",5))return 1;
        if(!strncmp(&(str[i]),"that.",5))return 1;
        if(!strncmp(&(str[i]),"the.",4))return 1;
}
else
        for(i++;;i++){
            if(str[i] == ' ' || str[i] == '.'){
                break;
            }
        }
for(i++;;i++){
            if(str[i] == ' ' || str[i] == '.'){
                break;
    }
    return 0;
}

int main(){
    char in[82];
    int n,i;
    while(fgets(in,X,stdin)!=EOF){

    n = strlen(in);

    while(1){
        for(i=0;i<n;i++){
            if(in[i] !=' ' && in[i] != '.'){
                in[i] = in[i] + 1;
                if(in[i] == 'z'+1)in[i] ='a';

            }
        }
        if(scan(in,n))break;
    }
    printf("%s\n",in);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:28: warning: comparison between pointer and integer
   32 |     while(fgets(in,X,stdin)!=EOF){
      |                            ^~
main.c: In function 'scan':
main.c:49:1: error: expected declaration or statement at end of input
   49 | }
      | ^
main.c:49:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
	char s[99],*p;
	while(gets(s)) {
		while(!strstr(s,"the") && !strstr(s,"this") && !strstr(s,"that")) {
			for(p=s; *p; p++) {
				if(*p>='a' && *p<='y')
					++*p;
				else if(*p=='z')
					*p='a';
			}
		}
		puts(s);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 |         while(gets(s)) {
      |               ^~~~
      |               fgets
Language: C

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

#define MAX 80	// Ã¶ÌÅå¶
#define THE 0	// »ÊÉg¤Pê
#define THIS 1
#define THAT 2
#define SORT 3	// »ÊPêÌíÞ
#define C_MAX 4	// »ÊPêÌÅå¶
#define A_NUM 26	// gp¶Ì

int main(void) {
	char s[MAX+1];
	char CRYPT[SORT][A_NUM][C_MAX+1];
	int flag;
	char c[MAX+1];
	int i, j, k;

	for(i = 0; i < A_NUM; i++) {
		CRYPT[THE][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][2] = ('e'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][3] = '\0';
		CRYPT[THIS][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][2] = ('i'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][3] = ('s'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][4] = '\0';
		CRYPT[THAT][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][2] = ('a'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][3] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][4] = '\0';
	}

	while(gets(s) != NULL) {
		flag = 0;
		j = 0;
		for(i = 0; i < strlen(s); i++) {
			if( s[i]!=' ' && s[i]!='.' ) {
				c[j++] = s[i];
				continue;
			}
			c[j] = '\0';
			j = 0;
			for(k = 0; k < A_NUM; k++) {
				if( strcmp(c, &CRYPT[THE][k][0])==0 || strcmp(c, &CRYPT[THIS][k][0])==0 || strcmp(s, &CRYPT[THAT][k][0])==0 ) {
					flag = 1;
					break;
				}
			}
			if(flag) {
				break;
			}
		}
		if(flag) {
			for(i = 0; i < strlen(s)-1; i++) {
				if( s[i]!=' ' && s[i]!='.' ) {
					if(s[i]-k >= 'a') {
						putchar(s[i]-k);
					} else {
						putchar(s[i]-k + A_NUM);
					}
				} else {
					putchar(s[i]);
				}
			}
			printf("\n");
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:36:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   36 |         while(gets(s) != NULL) {
      |               ^~~~
      |               fgets
main.c:36:23: warning: comparison between pointer and integer
   36 |         while(gets(s) != NULL) {
      |                       ^~
Language: C

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

#define MAX 80
#define THE 0
#define THIS 1
#define THAT 2
#define SORT 3
#define C_MAX 4
#define A_NUM 26

int main(void) {
	char s[MAX+1];
	char CRYPT[SORT][A_NUM][C_MAX+1];
	int flag;
	char c[MAX+1];
	int i, j, k;

	for(i = 0; i < A_NUM; i++) {
		CRYPT[THE][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][2] = ('e'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][3] = '\0';
		CRYPT[THIS][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][2] = ('i'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][3] = ('s'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][4] = '\0';
		CRYPT[THAT][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][2] = ('a'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][3] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][4] = '\0';
	}

	while(gets(s) != NULL) {
		flag = 0;
		j = 0;
		for(i = 0; i < strlen(s); i++) {
			if( (s[i]!=' ') && (s[i]!='.') ) {
				c[j++] = s[i];
				continue;
			}
			c[j] = '\0';
			j = 0;
			for(k = 0; k < A_NUM; k++) {
				if( (strcmp(c, &CRYPT[THE][k][0])==0) || (strcmp(c, &CRYPT[THIS][k][0])==0) || (strcmp(s, &CRYPT[THAT][k][0])==0) ) {
					flag = 1;
					break;
				}
			}
			if(flag) {
				break;
			}
		}
		if(flag) {
			for(i = 0; i < strlen(s)-1; i++) {
				if( (s[i]!=' ') && (s[i]!='.') ) {
					if( (s[i]-k) >= 'a' ) {
						putchar(s[i]-k);
					} else {
						putchar(s[i]-k + A_NUM);
					}
				} else {
					putchar(s[i]);
				}
			}
			printf("\n");
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:36:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   36 |         while(gets(s) != NULL) {
      |               ^~~~
      |               fgets
main.c:36:23: warning: comparison between pointer and integer
   36 |         while(gets(s) != NULL) {
      |                       ^~
Language: C

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

#define MAX 80	// Ã¶ÌÅå¶
#define THE 0	// »ÊÉg¤Pê
#define THIS 1
#define THAT 2
#define SORT 3		// »ÊPêÌíÞ
#define C_MAX 4		// »ÊPêÌÅå¶
#define A_NUM 26	// gp¶Ì

int main(void) {
	char s[MAX+1];
	char str[MAX+1];
	char CRYPT[SORT][A_NUM][C_MAX+1];
	int shift;
	char *c;
	int flag;
	int i;

	for(i = 0; i < A_NUM; i++) {
		CRYPT[THE][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][2] = ('e'-'a'+i)%A_NUM + 'a';
		CRYPT[THE][i][3] = '\0';
		CRYPT[THIS][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][2] = ('i'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][3] = ('s'-'a'+i)%A_NUM + 'a';
		CRYPT[THIS][i][4] = '\0';
		CRYPT[THAT][i][0] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][1] = ('h'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][2] = ('a'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][3] = ('t'-'a'+i)%A_NUM + 'a';
		CRYPT[THAT][i][4] = '\0';
	}

	while(gets(s) != NULL) {
		memcpy(str, s, (strlen(s)+1)*sizeof(char));
		shift = 0;
		flag = 0;
		c = strtok(str, " .");
		while(c != NULL) {
			for(shift = 0; shift < A_NUM; shift++) {
				if( (strcmp(c, &CRYPT[THE][shift][0])==0) || (strcmp(c, &CRYPT[THIS][shift][0])==0) || (strcmp(s, &CRYPT[THAT][shift][0])==0) ) {
					flag = 1;
					break;
				}
			}
			if(flag) {
				break;
			}
			c = strtok(NULL, " .");
		}
		for(i = 0; i < strlen(s)-1; i++) {	// US(ASCII CODE 0x1F) jbgæØèÌª¾¯}CiX
			if( (s[i]==' ') || (s[i]=='.') ) {
				printf("%1c", s[i]);
			} else {
				printf("%1c", s[i]-shift+((s[i]-shift)<'a')*A_NUM);
			}
		}
		printf("\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:38:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   38 |         while(gets(s) != NULL) {
      |               ^~~~
      |               fgets
main.c:38:23: warning: comparison between pointer and integer
   38 |         while(gets(s) != NULL) {
      |                       ^~
Language: C

// AOJ Volume 0 Problem 0017

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

#define DIFF(c1, c2)    ((((c2)-(c1))>=0)?((c2)-(c1)+1):((c2)-(c1)+1+26))


void conv(char *str, char *str_diff)
{
    int i;
    
    i = 0;
    do {
        switch (str[i]){
          case ' ':
          case '.':
            str_diff[i] = -2;
            break;

          case '\0':
            str_diff[i] = 0;
            break;
          
          default:
            if (str_diff[i - 1] == -2){
                str_diff[i] = -1;
            }
            else {
                str_diff[i] = DIFF(str[i - 1], str[i]);
            }
            break;
        }
//        printf("[%d<%c>]", str_diff[i], str[i]);
    } while (str[i++] != '\0');
}

int search(char *str1, char *str2)
{
    int i;
    
    for (i = 0; i <= strlen(str1) - strlen(str2); i++){
        if (strncmp(str1 + i, str2, strlen(str2)) == 0){
            return (i);
        }
    }
    
    return (-1);
}

int main(void)
{
    char str[82];
    char str_diff[82];
    char diff_the[5];
    char diff_this[6];
    char diff_that[6];
    int pos;
    int diff;
    char c;
    int i;
    
    diff_the[0] = -1;
    diff_the[1] = DIFF('t', 'h');
    diff_the[2] = DIFF('h', 'e');
    diff_the[3] = -2;    
    diff_the[4] = 0;    
    
    diff_this[0] = -1;
    diff_this[1] = DIFF('t', 'h');
    diff_this[2] = DIFF('h', 'i');
    diff_this[3] = DIFF('i', 's');
    diff_this[4] = -2;    
    diff_this[5] = 0;    

    diff_that[0] = -1;
    diff_that[1] = DIFF('t', 'h');
    diff_that[2] = DIFF('h', 'a');
    diff_that[3] = DIFF('a', 't');
    diff_that[4] = -2;    
    diff_that[5] = 0;    

    
    str[0] = ' ';
    gets(&str[1]);

    conv(str, str_diff);

    if ((pos = search(str_diff, diff_the)) == -1){
        if ((pos = search(str_diff, diff_this)) == -1){
            pos = search(str_diff, diff_that);
        }
    }
    
    diff = str[pos] - 't';
    if (diff < 0){
        diff += 26;
    }
    
    for (i = 1; i < strlen(str); i++){
        if ('a' <= str[i] && str[i] <= 'z'){
            c = str[i] - 'a' - diff;
            if (c < 0){
                c += 26;
            }
            c += 'a';
            
            printf("%c", c);
        }
        else {
            printf("%c", str[i]);
        }
    }
    
    printf("\n");
    
    return (0);
}

Compiler output:
main.c: In function 'main':
main.c:85:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   85 |     gets(&str[1]);
      |     ^~~~
      |     fgets