criyle/codenet-compile-errors huggingface dataset:
Language: C++


#include <iostream>
#include <stack>

int main(){
    stack<int> rail;
    int buf;
    
    // repeat until "cin" fails.
    while (cin >> buf) {
        if (buf == 0) { // train goes out.
            cout << rail.top();
            rail.pop();
        }
        else{   // train comes in.
            rail.push(buf);
        }
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'stack' was not declared in this scope; did you mean 'std::stack'?
    6 |     stack<int> rail;
      |     ^~~~~
      |     std::stack
In file included from /usr/include/c++/14/stack:63,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_stack.h:99:11: note: 'std::stack' declared here
   99 |     class stack
      |           ^~~~~
a.cc:6:11: error: expected primary-expression before 'int'
    6 |     stack<int> rail;
      |           ^~~
a.cc:10:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     while (cin >> buf) {
      |            ^~~
      |            std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |             cout << rail.top();
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:21: error: 'rail' was not declared in this scope
   12 |             cout << rail.top();
      |                     ^~~~
a.cc:16:13: error: 'rail' was not declared in this scope
   16 |             rail.push(buf);
      |             ^~~~
Language: C++

#include <math.h>
#include <algorithm>
#include <iomanip>
#include <string>
#include <stack>
using namespace std;

int main(){
	int i;
	stack<int> s;
	while (cin >> i) {
		if (i == 0) {
			cout << s.top() << endl;
			s.pop();
		} else {
			s.push(i);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'cin' was not declared in this scope
   11 |         while (cin >> i) {
      |                ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include <stack>
  +++ |+#include <iostream>
    6 | using namespace std;
a.cc:13:25: error: 'cout' was not declared in this scope
   13 |                         cout << s.top() << endl;
      |                         ^~~~
a.cc:13:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

import java.io.*;

 public class Main{
	 public static void main(String args[]) throws IOException{
		 BufferedReader bf = new BufferedReader(
				 new InputStreamReader(System.in));
		 int i = 0, j = 0,x;
		 int order[] = new int[10];
		 int exit[] = new int[1000];
		 String str;
		 while((str = bf.readLine()) != null){
			 x = Integer.parseInt(str);
			 if(x != 0){
				 order[i] = x;
				 i++;
			 } else {
				 exit[j] = order[i-1];
				 j++;
				 i--;
			 }
		 }
		 for(int c = 0; c < j; c++){
			 System.out.println(exit[c]);
		 }
	 }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:2: error: expected unqualified-id before 'public'
    3 |  public class Main{
      |  ^~~~~~
Language: C++

//#define scanf_s scanf
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 100
int main(void)
{
	int n, now = 0;
	int list[MAX] = { 0 };
	do{
		scanf_s("%d", &n);
		if (n != 0) { list[now] = n; ++now; }
		else { --now; printf("%d\n", list[now]); }
	} while (now != 0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   13 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include<iostream>
#include<stack>
using namespace std;

int main()
{
	int x;
	stack<int> st;
	while (cin >> x) {
		if (x) {
			st.push(n);
		}
		else {
			cout << st.top() << endl;
			st.pop();
		}
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: 'n' was not declared in this scope
   11 |                         st.push(n);
      |                                 ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
    int a;
    vector<int> s;
    vector<int> t;
    while(cin>>a){
        if(a!=0){
            s.push_back(a);
        }else{
            s.pop_back(a);
            t.push_back(s[s.size()-1]);
            s.pop_back(s[s.size()-1]);
        }
    }
    for(int i=0;i<t.size();i++){
        cout << t[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: no matching function for call to 'std::vector<int>::pop_back(int&)'
   12 |             s.pop_back(a);
      |             ~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:1324:7: note: candidate: 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = int; _Alloc = std::allocator<int>]'
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1324:7: note:   candidate expects 0 arguments, 1 provided
a.cc:14:23: error: no matching function for call to 'std::vector<int>::pop_back(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   14 |             s.pop_back(s[s.size()-1]);
      |             ~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1324:7: note: candidate: 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = int; _Alloc = std::allocator<int>]'
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1324:7: note:   candidate expects 0 arguments, 1 provided
Language: C++

{
stack<int>a;
int b;
scanf("%d",&b);
a.push(b);
while(cin>>b){
	if(b)a.push(b);
	else {printf("%d\n",a.top());a.pop();}
}
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {
      | ^
Language: C++

#include<stdio.h>
#include <stack>

int main(){
	stack<int> st;
	int n, a;

	while(cin >> n){
		if(n!=0){
			st.push( n );
		}else{
			a = st.top();
			cout << a << endl;
			st.pop();
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'stack' was not declared in this scope; did you mean 'std::stack'?
    5 |         stack<int> st;
      |         ^~~~~
      |         std::stack
In file included from /usr/include/c++/14/stack:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_stack.h:99:11: note: 'std::stack' declared here
   99 |     class stack
      |           ^~~~~
a.cc:5:15: error: expected primary-expression before 'int'
    5 |         stack<int> st;
      |               ^~~
a.cc:8:15: error: 'cin' was not declared in this scope
    8 |         while(cin >> n){
      |               ^~~
a.cc:10:25: error: 'st' was not declared in this scope; did you mean 'std'?
   10 |                         st.push( n );
      |                         ^~
      |                         std
a.cc:12:29: error: 'st' was not declared in this scope; did you mean 'std'?
   12 |                         a = st.top();
      |                             ^~
      |                             std
a.cc:13:25: error: 'cout' was not declared in this scope
   13 |                         cout << a << endl;
      |                         ^~~~
a.cc:13:38: error: 'endl' was not declared in this scope
   13 |                         cout << a << endl;
      |                                      ^~~~
Language: C++

#include<stdio.h>
#include <iostream>
#include <stack>

int main(){
	stack<int> st;
	int n, a;

	while(cin >> n){
		if(n!=0){
			st.push( n );
		}else{
			a = st.top();
			cout << a << endl;
			st.pop();
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'stack' was not declared in this scope; did you mean 'std::stack'?
    6 |         stack<int> st;
      |         ^~~~~
      |         std::stack
In file included from /usr/include/c++/14/stack:63,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_stack.h:99:11: note: 'std::stack' declared here
   99 |     class stack
      |           ^~~~~
a.cc:6:15: error: expected primary-expression before 'int'
    6 |         stack<int> st;
      |               ^~~
a.cc:9:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |         while(cin >> n){
      |               ^~~
      |               std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:25: error: 'st' was not declared in this scope; did you mean 'std'?
   11 |                         st.push( n );
      |                         ^~
      |                         std
a.cc:13:29: error: 'st' was not declared in this scope; did you mean 'std'?
   13 |                         a = st.top();
      |                             ^~
      |                             std
a.cc:14:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |                         cout << a << endl;
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |                         cout << a << endl;
      |                                      ^~~~
      |                                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <stack>
using namespace std;

int main()
{
	int num;
	stack<int> st;
	
	while(!cin.eof())
	{
		cin >> num;
		
		
		if(num==0)
		{
			cout << stack.top() << endl;
			st.pop();
		}
		else
		{
			st.push(num);
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:38: error: missing template arguments before '.' token
   17 |                         cout << stack.top() << endl;
      |                                      ^
Language: C++

#include <iostream>
#include <stack>
using namespace std;

int main()
{
	int num;
	stack<int> stack;
	
	while(cin >> num;)
	{		
		
		if(num==0)
		{
			cout << stack.top() << endl;
			stack.pop();
		}
		else
		{
			stack.push(num);
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected ')' before ';' token
   10 |         while(cin >> num;)
      |              ~          ^
      |                         )
a.cc:10:26: error: expected primary-expression before ')' token
   10 |         while(cin >> num;)
      |                          ^
Language: C++

#include<iostream>
#include<stack>
using namespace std;
int main(){
    stack<int> s;
    int n;
    cin>>n;
    s.push(n);
    while(cin>>n{
        if(n==0){
            cout<<s.top()<<endl;
            s.pop();
        }
        else{
            s.push(n);
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ')' before '{' token
    9 |     while(cin>>n{
      |          ~      ^
      |                 )
Language: C++

list = {}
while True:
    try:
        num = int(input())
        if num == 0:
            print(list.pop())
        else:
            list.append(num)
    except:
        break

Compiler output:
a.cc:1:1: error: 'list' does not name a type
    1 | list = {}
      | ^~~~
a.cc:2:1: error: expected unqualified-id before 'while'
    2 | while True:
      | ^~~~~
Language: C++

#include<iostream>

#define MAX 256

int main(void){
	
	int i=0,j=0;
	int a[MAX];
	int ans[MAX];
	while(cin>>x){
		if(x==0){
			ans[j]=a[i-1];
			j++;
			i--;
		}else{
			ans[i]=x;
			i++;
		}
		
		
	}
	
	for(int i=0;i<j;i++){
		cout<<ans[i]<<endl
	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |         while(cin>>x){
      |               ^~~
      |               std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:20: error: 'x' was not declared in this scope
   10 |         while(cin>>x){
      |                    ^
a.cc:24:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |                 cout<<ans[i]<<endl
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |                 cout<<ans[i]<<endl
      |                               ^~~~
      |                               std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<stdio.h>
const int SIZE=100;
int data[SIZE];
int sp=0;
int size(){
  return sp;
}
int empty(){
  return sp<=0;
}
int top(){
  return data[sp-1];
}
void pop(){
  sp--;
}
void push(int v){
  data[sp]=v;
  sp++;
}
int main(){
  int n,k;
  while(1){
    scanf("%d",&n);
    if(n==0){
      printf("%d\n",top());
      pop();
    }else{
      push(n);
    }
    if(n==empty)break;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |     if(n==empty)break;
      |        ~^~~~~~~
Language: C++

#include <stdio.h>
const int SIZE = 100;
int data[SIZE];
int sp= 0;

int size(){
 return sp;
}

int top(){ return data[sp-1];
}
void pop(){
 sp--;
}

void push(int v){
 data[sp] = v;
 sp++;
}

int main(){
 int v;
 while(scanf("%d", &v)) != EOF){
  if(v != 0){
    push(v);
  }
  if(v == 0){
   pop();
  }
  top();
 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: expected primary-expression before '!=' token
   23 |  while(scanf("%d", &v)) != EOF){
      |                         ^~
Language: C++

#include<stdio.h>
const int SIZE=100;
int data[SIZE];
int sp=0;
int size(){
  return sp;
}
int empty(){
  return sp<=0;
}
int isfull(){
  return sp>=SIZE;
}
int top(){
  return data[sp-1];
}
void pop(){
  sp--;
}
void push(int v){
  data[sp]=v;
  sp++;
}
int main(){
  int k,n;
  for(k=0;k<100;k++){
    scanf("%d",&n);
    if(!empty(){
      if(n==0){
        printf("%d\n",top());
        pop();
      }
    }else{
      if(!isfull()){
        push(n);
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: expected ')' before '{' token
   28 |     if(!empty(){
      |       ~        ^
      |                )
a.cc:38:3: error: expected primary-expression before '}' token
   38 |   }
      |   ^
Language: C++

#include <stdio.h>
const int SIZE = 100;
int data[SIZE];
int sp= 0;

void pop(){
 sp--;
}

void push(int v){
 data[sp] = v;
 sp++;
}

int main(){
 int v;
 while(scanf("%d", &v) != EOF){
  if(v != 0){
    push(v);
  }
  if(v == 0){
   printf("%d\n", top());
   pop();
  }
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: 'top' was not declared in this scope; did you mean 'pop'?
   22 |    printf("%d\n", top());
      |                   ^~~
      |                   pop
Language: C++

#include <stdio.h>
const int SIZE = 100;
int data[SIZE];
int sp= 0;

void pop(){
 sp--;
}

void push(int v){
 data[sp] = v;
 sp++;
}

int main(){
 int v;
 while(scanf("%d", &v) != EOF){
  if(v != 0){
   push(v);
  }
  if(v == 0){
   printf("%d\n", top());
   pop();
  }
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: 'top' was not declared in this scope; did you mean 'pop'?
   22 |    printf("%d\n", top());
      |                   ^~~
      |                   pop
Language: C++

#include<iostream>
#include<stack>
using namespace std;
int main(){
    stack<int>  s;
    int x;
    cin >> x;
    s.push(x);
    while(!s.empty()){
        cin >> x;
        if(x==0){
            cout << st.top() << endl;
            st.pop();
        }
        else{
            s.push(x);
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'st' was not declared in this scope; did you mean 's'?
   12 |             cout << st.top() << endl;
      |                     ^~
      |                     s
Language: C++

#include <stdio.h>
 
int main(void) {
  std::stack<int> st;
  int n;
  while(scanf("%d", &n) != EOF) {
    if(n) st.push(n);
    else {
      printf("%d\n", st.top());
      st.pop();
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: 'stack' is not a member of 'std'
    4 |   std::stack<int> st;
      |        ^~~~~
a.cc:2:1: note: 'std::stack' is defined in header '<stack>'; this is probably fixable by adding '#include <stack>'
    1 | #include <stdio.h>
  +++ |+#include <stack>
    2 | 
a.cc:4:14: error: expected primary-expression before 'int'
    4 |   std::stack<int> st;
      |              ^~~
a.cc:7:11: error: 'st' was not declared in this scope; did you mean 'std'?
    7 |     if(n) st.push(n);
      |           ^~
      |           std
a.cc:9:22: error: 'st' was not declared in this scope; did you mean 'std'?
    9 |       printf("%d\n", st.top());
      |                      ^~
      |                      std
Language: C++

#include　<iostream>

int stack[100];
int point=0;

void push(int p){
	stack[point]=0;
	++point;
}

void pop(){
	std:cout << stack[point] << endl;
	--point;
}

int main(){
	int num;

	for(int i=0;i<100;i++){
		std:cin >> num;
		if(num==0) pop();
		else push(num);
	}

    return 0;
}


Compiler output:
a.cc:1:2: error: extended character 　 is not valid in an identifier
    1 | #include　<iostream>
      |  ^
a.cc:1:2: error: invalid preprocessing directive #include\U00003000
    1 | #include　<iostream>
      |  ^~~~~~~~~
a.cc: In function 'void pop()':
a.cc:12:13: error: 'cout' was not declared in this scope
   12 |         std:cout << stack[point] << endl;
      |             ^~~~
a.cc:12:37: error: 'endl' was not declared in this scope
   12 |         std:cout << stack[point] << endl;
      |                                     ^~~~
a.cc: In function 'int main()':
a.cc:20:21: error: 'cin' was not declared in this scope
   20 |                 std:cin >> num;
      |                     ^~~
Language: C++

#include　<iostream>

int stack[100];
int point=0;

void push(int p){
	stack[point]=0;
	++point;
}

void pop(){
	std::cout << stack[point] << std::endl;
	--point;
}

int main(){
	int num;

	for(int i=0;i<100;i++){
		std::cin >> num;
		if(num==0) pop();
		else push(num);
	}

    return 0;
}



Compiler output:
a.cc:1:2: error: extended character 　 is not valid in an identifier
    1 | #include　<iostream>
      |  ^
a.cc:1:2: error: invalid preprocessing directive #include\U00003000
    1 | #include　<iostream>
      |  ^~~~~~~~~
a.cc: In function 'void pop()':
a.cc:12:14: error: 'cout' is not a member of 'std'
   12 |         std::cout << stack[point] << std::endl;
      |              ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include　<iostream>
a.cc:12:43: error: 'endl' is not a member of 'std'
   12 |         std::cout << stack[point] << std::endl;
      |                                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include　<iostream>
a.cc: In function 'int main()':
a.cc:20:22: error: 'cin' is not a member of 'std'
   20 |                 std::cin >> num;
      |                      ^~~
a.cc:20:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include　<iostream>
#include <array>

std::array<u_int, 100> stack;
int point=0;

void push(int p){
	stack[point]=p;
	++point;
}

void pop(){
	std::cout << stack[point] << std::endl;
	--point;
}

int main(){
	int num;

	for(int i=0;i<100;i++){
		std::cin >> num;
		if(num==0) pop();
		else push(num);
	}

    return 0;
}



Compiler output:
a.cc:1:2: error: extended character 　 is not valid in an identifier
    1 | #include　<iostream>
      |  ^
a.cc:1:2: error: invalid preprocessing directive #include\U00003000
    1 | #include　<iostream>
      |  ^~~~~~~~~
a.cc:4:12: error: 'u_int' was not declared in this scope; did you mean 'int'?
    4 | std::array<u_int, 100> stack;
      |            ^~~~~
      |            int
a.cc:4:22: error: template argument 1 is invalid
    4 | std::array<u_int, 100> stack;
      |                      ^
a.cc: In function 'void push(int)':
a.cc:8:14: error: invalid types 'int[int]' for array subscript
    8 |         stack[point]=p;
      |              ^
a.cc: In function 'void pop()':
a.cc:13:14: error: 'cout' is not a member of 'std'
   13 |         std::cout << stack[point] << std::endl;
      |              ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <array>
  +++ |+#include <iostream>
    3 | 
a.cc:13:27: error: invalid types 'int[int]' for array subscript
   13 |         std::cout << stack[point] << std::endl;
      |                           ^
a.cc:13:43: error: 'endl' is not a member of 'std'
   13 |         std::cout << stack[point] << std::endl;
      |                                           ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <array>
  +++ |+#include <ostream>
    3 | 
a.cc: In function 'int main()':
a.cc:21:22: error: 'cin' is not a member of 'std'
   21 |                 std::cin >> num;
      |                      ^~~
a.cc:21:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<stack>
#include<iostream>
using namespace std;
void main(){
	stack<int> train;
	int n;
	while(cin >> n){
		if(n != 0)
			train.push(n);
		else{
			cout << train.top() << endl;
			train.pop();
		}
	}
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(){
      | ^~~~
Language: C++

n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);}

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);}
      | ^
a.cc:1:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);}
      |         ^~~~
a.cc: In function 'int main()':
a.cc:1:33: error: 'a' was not declared in this scope
    1 | n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);}
      |                                 ^
a.cc:1:22: error: 'scanf' was not declared in this scope
    1 | n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);}
      |                      ^~~~~
a.cc:1:46: error: 'puts' was not declared in this scope
    1 | n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);}
      |                                              ^~~~
Language: C++

#include <iostream>
#include <vector>

int main(int argc,char* argv[]){
  std::vector<int> vec(1000);
  
  while(!std::cin.eof()){
    int temp;
    std::cin >> temp;
    if(temp == 0){
      std::cout << vec.back() << std::endl;
      vec.pop_back();
      continue;
    }else{
      vec.push_back(temp);
      continue;
    }
  }

  return 0;
  

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:20:12: error: expected '}' at end of input
   20 |   return 0;
      |            ^
a.cc:4:32: note: to match this '{'
    4 | int main(int argc,char* argv[]){
      |                                ^
Language: C++

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

#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

#define PUSH intStackPush
#define POP intStackPop
#define TOP intStackTop
#define FREE intStackFree

typedef struct stack{ int data; struct stack* next; }stack;

stack *top = NULL;

stack* makeNewStack(int data){
  stack *new = (stack*)malloc(sizeof(stack));
  new->data = data;
  new->next = NULL;
  return new;
}

void intStackPush(int data){
  stack *new = makeNewStack(data);
  if(top != NULL){ new->next = top; top = new; }
  else top = new;
}

void intStackPop(){
  stack *temp;
  temp = top;
  top = top->next;
  free(temp);
}

int intStackTop(){ return top->data;}

void intStackFree(){ while(top != NULL) intStackPop();}

int main(){
  int in;

  while(scanf("%d", &in) != EOF){
    if(in == 0){
      printf("%d\n",TOP());
      POP();
    }
    else PUSH(in);
  }

  FREE();
  return 0;
}

Compiler output:
a.cc: In function 'stack* makeNewStack(int)':
a.cc:19:10: error: expected unqualified-id before 'new'
   19 |   stack *new = (stack*)malloc(sizeof(stack));
      |          ^~~
a.cc:20:6: error: expected type-specifier before '->' token
   20 |   new->data = data;
      |      ^~
a.cc:21:6: error: expected type-specifier before '->' token
   21 |   new->next = NULL;
      |      ^~
a.cc:22:13: error: expected type-specifier before ';' token
   22 |   return new;
      |             ^
a.cc: In function 'void intStackPush(int)':
a.cc:26:10: error: expected unqualified-id before 'new'
   26 |   stack *new = makeNewStack(data);
      |          ^~~
a.cc:27:23: error: expected type-specifier before '->' token
   27 |   if(top != NULL){ new->next = top; top = new; }
      |                       ^~
a.cc:27:46: error: expected type-specifier before ';' token
   27 |   if(top != NULL){ new->next = top; top = new; }
      |                                              ^
a.cc:28:17: error: expected type-specifier before ';' token
   28 |   else top = new;
      |                 ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <stack>

using namespace std;

stack<int> s;
int ac;

int main(void) {
    s.clear();
    while(~scanf("%d", &ac)) {
        if(ac == 0) {
            cout << s.top() << endl;
            s.pop();
        } else {
            s.push(ac);
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'class std::stack<int>' has no member named 'clear'
   11 |     s.clear();
      |       ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int a[]={0,0,0,0,0,0,0,0,0,0};
int b;
while(cin>>b){
if(b==0){
cout<<a[0];
for(int i=0;i<9;i++){
a[i]=a[i+1];}}
else{
for(int i=0;i<8;i++){
a[9-i]=a[8-i]}
a[0]=b;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before '}' token
   13 | a[9-i]=a[8-i]}
      |              ^
      |              ;
a.cc:14:10: error: expected '}' at end of input
   14 | a[0]=b;}}
      |          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a[]={0,0,0,0,0,0,0,0,0,0};
int b;
while(cin>>b){
if(b==0){
cout<<a[0];
for(int i=0;i<9;i++){
a[i]=a[i+1];}}
else{
for(int i=0;i<8;i++){
a[9-i]=a[8-i];}
a[0]=b;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: expected '}' at end of input
   14 | a[0]=b;}}
      |          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a[]={0,0,0,0,0,0,0,0,0,0};
int b;
while(cin>>b){
if(b==0){
cout<<a[0];
for(int i=0;i<9;i++){
a[i]=a[i+1];}}
else{
for(int i=0;i<9;i++){
a[9-i]=a[8-i];}
a[0]=b;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: expected '}' at end of input
   14 | a[0]=b;}}
      |          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <stack>
#include <vector>
using namespace std;

int main()
{
	stack<int> car;
	vector<int> outlist;

	while( !car.empty() || outlist.empty() )
	{
		int carnum;
		cin >> carnum;
		if(carnum)
		{
			car.push(carnum);
		}
		else
		{
			outlist.push_back(car.top());
			car.pop();
		}
	}
	
	cout << outlist[i] << '\n';
	for(size_t i=0; i<outlist.size(); ++i)
	{
		cout << outlist[i] << '\n';
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: 'i' was not declared in this scope
   26 |         cout << outlist[i] << '\n';
      |                         ^
Language: C++

#include<cstdio>
#include<queue>
using namespace std;

int main(){
  int x;
  queue<int> q;
  while(scanf("%d", &x) != EOF){
    if(x == 0){
      printf("%d\n", q.top());
      q.pop();
    }
    else{
      q.push(x);
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   10 |       printf("%d\n", q.top());
      |                        ^~~
      |                        pop
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main()
{
int a;
vector<int> array;
for(;cin >> a;)
{
if(a==0)
{
cout << array[array.size()-1] << endl;
array.pop();
}
else
array.push_back(a);
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'class std::vector<int>' has no member named 'pop'
   15 | array.pop();
      |       ^~~
Language: C++

const int N=10;
using namespace std;


int main(){
    int a[N];
    int n=0;
    while (!cin.eof()){
        int t;
        cin>>t;
        if (t) a[n++]=t;
        else cout<<a[--n]<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'cin' was not declared in this scope
    8 |     while (!cin.eof()){
      |             ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | const int N=10;
a.cc:12:14: error: 'cout' was not declared in this scope
   12 |         else cout<<a[--n]<<endl;
      |              ^~~~
a.cc:12:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:28: error: 'endl' was not declared in this scope
   12 |         else cout<<a[--n]<<endl;
      |                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | const int N=10;
Language: C++

#include <iostream>
#include <stack>
#include <cstdio>
using namespace std;

int main(){
  stack<int> st;
  int a;
  while(cin>>a){
    if(a)st.push(a);
    else {printf("%d\n",st.top());
      st.pop();
    }
}

   }
  return 0;
}

Compiler output:
a.cc:17:3: error: expected unqualified-id before 'return'
   17 |   return 0;
      |   ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<iostream>
int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n"}return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:92: error: expected ';' before '}' token
    2 | int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n"}return 0;}
      |                                                                                            ^
      |                                                                                            ;
Language: C++

#include<iostream>int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n";}return 0;}

Compiler output:
a.cc:1:23: warning: extra tokens at end of #include directive
    1 | #include<iostream>int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n";}return 0;}
      |                       ^~~~
a.cc:1:9: fatal error: iostream>in: No such file or directory
    1 | #include<iostream>int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n";}return 0;}
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int d=sc.nextInt();
int n=600/d-1;
int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
System.out.println(s);
}
}
}

Compiler output:
Main.java:9: error: ')' expected
int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                ^
Main.java:9: error: not a statement
int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                 ^
Main.java:9: error: ';' expected
int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                   ^
Main.java:9: error: not a statement
int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                                  ^
4 errors
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int d=sc.nextInt();
int n=600/d-1;
int s=n*(n+1)*(2n+1)*d*d*d/6;
System.out.println(s);
}
}
}

Compiler output:
Main.java:9: error: ')' expected
int s=n*(n+1)*(2n+1)*d*d*d/6;
                ^
Main.java:9: error: not a statement
int s=n*(n+1)*(2n+1)*d*d*d/6;
                 ^
Main.java:9: error: ';' expected
int s=n*(n+1)*(2n+1)*d*d*d/6;
                   ^
Main.java:9: error: not a statement
int s=n*(n+1)*(2n+1)*d*d*d/6;
                          ^
4 errors
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int d=sc.nextInt();
int n=600/d-1;
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
System.out.println(s);
}
}
}

Compiler output:
Main.java:9: error: ')' expected
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                 ^
Main.java:9: error: not a statement
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                  ^
Main.java:9: error: ';' expected
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                    ^
Main.java:9: error: not a statement
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                                   ^
4 errors
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int d=sc.nextInt();
int n=(600/d)-1;
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
System.out.println(s);
}
}
}

Compiler output:
Main.java:9: error: ')' expected
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                 ^
Main.java:9: error: not a statement
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                  ^
Main.java:9: error: ';' expected
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                    ^
Main.java:9: error: not a statement
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                                   ^
4 errors
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
long d=sc.nextLong();
long n=(600/d)-1;
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
System.out.println(s);
}
}
}

Compiler output:
Main.java:9: error: ')' expected
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                 ^
Main.java:9: error: not a statement
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                  ^
Main.java:9: error: ';' expected
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                    ^
Main.java:9: error: not a statement
long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6;
                                   ^
4 errors
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
long d=sc.nextLong();
long n=(600/d)-1;
long s=((2*Math.pow(n,3)+3*Math.pow(n,2)+n)*Math.pow(d,3))/6;
System.out.println(s);
}
}
}

Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from double to long
long s=((2*Math.pow(n,3)+3*Math.pow(n,2)+n)*Math.pow(d,3))/6;
                                                          ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Integral {

	/**
	 * ??????????????¨????????¢???????????¨????????? y = x^2 x = 600
	 * ?????????????¨????????????????
	 * @param args
	 * @throws IOException
	 * @throws NumberFormatException
	 */
	public static void main(String[] args) throws NumberFormatException,
			IOException {
		// TODO ?????????????????????????????????????????????
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		System.out.println("?????????????????????:");
		int width = Integer.parseInt(br.readLine());

		System.out.println(calcArea(width));

	}

	public static int calcArea(int width) {
		// ????????¢????¨??????????????±????????????¨????????????
		int num = 600 / width; // ?????????????????¢????????¨????????????
		int sum = 0;
		int c = width;
		for (int i = 1; i <= num; i++) {
			// ?¨????????????????width
			// ????????????:f(b) =???x???2???= height
			int height = (int) Math.pow(c, 2);
			int menseki = width * height;
			System.out.println(width + "*" + height);
			sum += menseki;
			c += width;
		}
		return sum;

	}

}

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


	public static void main(String[] args) throws IOException
	{
		BufferedReader br =
			new BufferedReader(new InputStreamReader(System.in));

		String str;

	while((str=br.readLine()) != null){

		int integral = 0;
		int  j=1;

		int d = Integer.parseInt(str);

		int num = 600 / d;

		for(int i=0; i<num-1; i++){

			integral = integral + (j*d)*(j*d)*d;
			j++;

		}


		System.out.println(integral);

	}


	}

Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) throws IOException
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> list = new ArrayList<Integer>();
		while(scan.hasNext()){
			int d = scan.nextInt();
			int n600 = 600;
			int ans = 0;
			for(int x = d; x < n600; x += d){
				ans += d * ((x * x);
			}
			list.add(ans);
		}

		for(int n : list){
			System.out.printf("%d\n", n);
		}
	}
}

Compiler output:
Main.java:13: error: ')' expected
				ans += d * ((x * x);
				                   ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
        public static void main(String[] args){
                Scanner s = new Scanner(System.in);
                int d;
                while(true){
                        d=s.nextInt();
                        if(d != null) integral(d[i]);
                        else System.exit(-1);
                }
        }

        public static void integral(int d){
                int surface = 0;
                for(int i = 0;i < 600;i += d){
                        surface += i*i*d;
                }

                System.out.println(surface);
        }
}

Compiler output:
Main.java:9: error: bad operand types for binary operator '!='
                        if(d != null) integral(d[i]);
                             ^
  first type:  int
  second type: <null>
Main.java:9: error: cannot find symbol
                        if(d != null) integral(d[i]);
                                                 ^
  symbol:   variable i
  location: class Main
Main.java:9: error: array required, but int found
                        if(d != null) integral(d[i]);
                                                ^
3 errors
Language: Java

import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

class Main {
    public static void main (String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while (sc.hasNextInt()) {
            int d = Integer.parseInt(br.readLine());
            System.out.println(100 * (600 - d) * (1200 - d));
        }
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        while (sc.hasNextInt()) {
               ^
  symbol:   variable sc
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

//public class Problem0014_Integral {
public class Main {
	public static void main(String[] args) {
		try {
		//	Problem0014_Integral test = new Problem0014_Integral();
			Main test = new Main();
			
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String line;
			CarStack stack = new CarStack();
			while((line = reader.readLine()) != null) {
				try {
					int number = Integer.parseInt(line);
					System.out.println(test.getSummationArea(number));
				} catch(NumberFormatException e) {
					break;
				}
			}
			
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	int getSummationArea(int gap) {
		int x = 0;
		int summationArea = 0;
		while(x < 600) {	//600ÌñªInputÌf[^Å é±Æ©çAíÉ x=600 ÆÈéªI
			summationArea += getArea(x, gap);
			x += gap;
		}
		
		return summationArea;
	}
	int getArea(int start, int width) {
		int height = start * start;
		int area = width * height;
	//	System.out.println("x:" + start + "\theight:" + height + "\twidth:" + width + "\tarea:" + area);
		return area;
	}
}

Compiler output:
Main.java:14: error: cannot find symbol
			CarStack stack = new CarStack();
			^
  symbol:   class CarStack
  location: class Main
Main.java:14: error: cannot find symbol
			CarStack stack = new CarStack();
			                     ^
  symbol:   class CarStack
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Integral {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNext())calc(in);
	}
	private static void calc(Scanner in){
		int sum=0,d = in.nextInt();
		for(int i=1;d*i<=600-d;i++)
			sum+=Math.pow(d*i, 2)*d;
		System.out.println(sum);
	}
}

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

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d, x;
		while (sc.hasNext()) {
			area = 0;
			d = sc.nextInt();
			for (int i = 0; i < 600; i += d) {
				x = i * i;
				area += x * d;
			}
			System.out.println(area);
		}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
			area = 0;
			^
  symbol:   variable area
  location: class Main
Main.java:12: error: cannot find symbol
				area += x * d;
				^
  symbol:   variable area
  location: class Main
Main.java:14: error: cannot find symbol
			System.out.println(area);
			                   ^
  symbol:   variable area
  location: class Main
3 errors
Language: C

#include <stdio.h>

int main(void){
  int d,h,i;

  scanf("%d",&d);

  for(i=0;i<600/d;i++){
    h += d*i*d*i
  }

  printf("%d\n", h*d);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: expected ';' before '}' token
    9 |     h += d*i*d*i
      |                 ^
      |                 ;
   10 |   }
      |   ~
Language: C

#include <stdio.h>

int main(void){
  int d,h,i;

  while(EOF!=scanf("%d",&d)){

  for(i=0;i<600/d;i++){
    h += d*i*d*i
  }

  printf("%d\n", h*d);

}

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: expected ';' before '}' token
    9 |     h += d*i*d*i
      |                 ^
      |                 ;
   10 |   }
      |   ~
Language: C

#include<stdio.h>

int function(int x){
  return x * x;
}

int main(void){
  
  int d;
  int i;

  while(scanf("%d",&d) != EOF){

    s = 0;

  for(i=0;i<600;i+=d){
    s += d*function(i);
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:5: error: 's' undeclared (first use in this function)
   14 |     s = 0;
      |     ^
main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include "stdio.h"
#include "math.h"

int main()
{
	int d, x;

	while(scanf("%d", &d) != EOF){
		x = 0;

		for(int i = 0; i < 600; i += d){
			x += (d * pow(i, 2.0));
		}

		printf("%d\n", x);
	}

	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/cctOJF4c.o: in function `main':
main.c:(.text+0x4d): undefined reference to `pow'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>

int main() {

	int d, i, sum, length;
	while (scanf_s("%d", &d) != EOF) {
		length = 600; sum = 0;
		for (i = 1; i<length / d; i++) {
			sum += i*i*d*d;
		}
		printf("%d", sum*d);
	}
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         while (scanf_s("%d", &d) != EOF) {
      |                ^~~~~~~
      |                scanf
Language: C

#include <stdio.h>
main()
{   long int x,ret;
 
    while(EOF != scanf("%ld",&n))
    {
        ret = x* x * x * (600/x-1)*(600/x)*(600/x*2-1)/6;
 
printf("%ld\n",ret);
}
return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c: In function 'main':
main.c:5:31: error: 'n' undeclared (first use in this function)
    5 |     while(EOF != scanf("%ld",&n))
      |                               ^
main.c:5:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h> 
int main(){
 
  int d,i,s_sum;
  
  cnt =0;
  s_sum=0;
  while(scanf("%d",&d)!=EOF){
 
    for(i=1;(d*i)<=(600-d);i++)
    {
       s_sum=s_sum+d*(d*i)*(d*i);
    }
    
     printf("%d\n", s_sum);
   }   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
    6 |   cnt =0;
      |   ^~~
      |   int
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
int i,j,area=0;
for(i=0;i<20;i++)
{
scanf("%d\n",&d);
for(j=1;j<=600-d;j++) area+=d^3*j^2;
printf("%d\n",area);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:15: error: 'd' undeclared (first use in this function)
    8 | scanf("%d\n",&d);
      |               ^
main.c:8:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main()
{
   int d, s, i, sum;

   while(scanf("%d", &d)!=EOF){

      sum = 0;

      for(i*d=0; i*d<=600-d; i++){
         s = d*(i*d)*(i*d);
         sum = sum + s;
      }

      printf("%d\n", sum);

   }

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:14: error: lvalue required as left operand of assignment
   11 |       for(i*d=0; i*d<=600-d; i++){
      |              ^
Language: C

#include <stdio.h>

int area(int x,int d);
int main(void) {
	int x, s, d, i, j;
	for (;;) {
		scanf_s("%d", &d);
		x = 600 / d;
		s = 0;
		for (j = 1; j < x; j++) {
			s += area(j,d);
		}
		printf("%d\n", s);
	}
	return 0;
}
int area(int x,int d) {
	return d*(x*d)*(x*d);
}


Compiler output:
main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |                 scanf_s("%d", &d);
      |                 ^~~~~~~
      |                 scanf