CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

int gcd(int m,int n) {

	int remainder;

	while(m%n!=0) {
		remainder = m%n;
		m = n;
		n = remainder;
	}
	return remainder;
}

main_program {

	int m,n;
	cin >> m >> n;
		

	cout<<(m*n)/gcd(m,n)<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

int gcd(int m,int n){
	while(m%n!=0){
		int temp=m%n;
		m=n;
		n=temp;
	}
	return n;
}

main_program{
	int x,y,a,b;
	cin>>x>>y;
	if(x>y){
		a=x;
		b=y;
	}
	else{
		b=x;
		a=y;
	}
	int lcm=a*b/gcd(a,b);
	cout<<lcm<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

int gcd(int m,int n)     //creating function of gcd to compute gcd of two numbers
{
	while(n%m!=0)
	{
		int Remainder=n%m;
		n=m;
		m=Remainder;
	}
	return m;
}

float lcm(int m,int n)   //creating function of lcm to compute the lcm of two numbers
{
	float lcm=(m*n)/gcd(m,n);    //using the gcd function created above
	return lcm;
}

main_program
{
	int m,n;
	cin>>m>>n;       //taking input from user

	cout<<lcm(m,n)<<endl;      //prints the lcm of both numbers given by user
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
main_program {
	int m,n,x,y,z;
	cin>>m>>n;
	x=n;
	y=m;
	while(m%n !=0) {
		z=n;
		n=m%n;
		m=z;
	}
	int l;
	l=(y*x)/n;
	cout<<l<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

main_program
{
	int num1, num2;
	cin >> num1 >> num2;
	int LCM;
	for (int i = max(num1,num2); ;i++)
	{
		if((i%num1 == 0) && (i%num2 == 0))
		{
			LCM = i;
			break;
		}
	}
	
	cout << LCM << endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int gcd(int a,int b){
                while(a%b!=0){
                        int remainder=a%b;
                        a=b;
                        b=remainder;}
                return(b);}
int lcm(int a,int b){
	return(a*b/gcd(a,b));}
main_program{
	int a,b;
	cin>>a>>b;
	if(a>b){int temp=a;a=b;b=temp;}
	cout<<lcm(a,b);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int gcd(int a, int b){
	int remainder;
	if (a>b){
		while(a%b != 0){
			remainder =  a%b ;
			a = b ;
			b = remainder ;
		}
		return b ;
	}
	else{
		while(b%a != 0){
			remainder = b%a ;
			b = a ;
			a = remainder ;
		}
		return a ;
	}
}

int lcm(int a, int b){
	return (a*b)/gcd(a,b) ;
}
main_program{
	int a, b ;
	cin >> a >> b ;
	cout << lcm(a,b) ;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
main_program{
int A,B;
cout<<"

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
main_program{
	int a,b;
	cin>>a>>b;
	for (a<=b){
        if (b-(a*b/a)=0)
		gcd=a;
	else if (a=b-(a*b/a)) && (b=a);
	gcd=a;
	}
	for (b>a){ (a=b) && (b=a)}
	cout<<(a*b)/gcd<<" "<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
main_program{

	int A, B;
	cin >> A>>B;
	
       	if (A>B){
		 int i=A;
		 while(i%A!=0 || i%B!=0){ i++; }
		 cout <<i;
	 }
       
	if(B>A){
		 int i=B;
		 while(i%A!=0 || i%B!=0){i++;}
		 cout<<i;
	 }
	 if(B==A){cout<<A;}
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
main_program
{
	int A, B, C, D, temp;
	cin >> A >> B;
	C=A;
	D=B;
	if(A>=B)
	{
	while(A%B!=0)
	{
		temp = A%B;
		A=B;
		B=temp;
	}
	cout << D*C/B ;
	}
	if (A<B)
	{
		while(B%A!=0)
		{
			temp = B%A;
			B=A;
			A = temp;
		}
		cout << C*D/A << endl;
	}
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
main_program{
	int A,B,C;
	cin>>A>>B;
	C=2;
	repeat(A*B){
		if(C%A==0 && C%B==0) 
			cout<<" the LCM of A&B is :"<<C;
		else
			C++;
	}
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
int lcm(int a, int b) {
	int remainder;
	int gcd;

		while(b%a!=0) {
			remainder = b%a;
			b=a;
		a=remainder;
		gcd = a;
		}
		
	int k = ((a*b)/(gcd));
	return k;
}
#include<simplecpp>
main_program{
	int p,q;
	cin >> p >> q;
	int result = lcm(p,q);
	cout << result;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
int gcd(int& A, int& B){
	int r;
	if (A>B){
		r= A % B;

		if(r!=0){
			
			A=B;
			B= r;
			
		}
		return B;
	}
	
	else{
		r= B % A;

		if(r!=0){
			
			B=A;
			A= r;
	

	}
		return A;
	}
}

main_program{
	int lcm,A,B;
	cin >> A >> B;

	lcm =( A*B)/gcd(A,B);
	cout << lcm;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

int GCD(int &m,int &n){
                int remainder;
                if(m%n==0)remainder=n;
                else{
                        m=n;
                        n=m%n;
                        remainder=n;
                }
             return remainder;
        }

int LCM(int &a,int &b){
	int p;
      	p=(a*b)/GCD(a,b);
	return p;
}

main_program{
	int x,y;
	cin>>x>>y;
	cout<<LCM(x,y);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
int gcd(int a , int b) {
	int remainder;
	while(a%b!=0) {
		remainder = a%b;
		a=b;
		b/=remainder;
	}
	return b;
}
		

int lcm(int a , int b) {
	return (a*b)/gcd(a,b);
}

main_program 
{
	int a , b;
	cin >> a >> b;
	cout << lcm(a , b);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
main_program{
	int a,b;
	cin>>a>>b;
	cout<<function(a,b);
}
int function(int a,int b){

	int lcm;
	if(a>b){
		lcm=a;
	}
	else lcm=b;

	do
	{
		if((lcm%a==0)&&(lcm%b==0)){
		cout<<lcm;	
			break;
		}
		else
	      ++lcm;
	}while(true);

return(0);

}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int lcm(int a, int b){
	int x=a;
	int y=b;
	while(y%x!=0){
		int z=x;
	        x=y%x;
	        y=z;
	}
	int lcm;
	lcm=(a/x)*(b/x)*x;
	return lcm;
}
main_program{
	int A,B;
	cin>>A>>B;
	int lcmm;
	lcmm=lcm(A,B);
	cout<<lcmm;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int gcd(int a , int b){
	int r;
	while(a%b != 0){
		r = a%b;
		a = b;
		b = r;
	}
	return b;
}
int lcm(int m , int n){
	int ans = m*n/(gcd(m,n));
	return ans;
	}
main_program{
	int a ,b;
	cin >>a>>b;
	cout<<lcm(a,b);
	}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int LCM{
	int i=1;

while(i<a){
	if( a%i==0&&b%i==0)
	
	{z=a*b;
       LCM=a*b/i;
	       }
	
	i++;}
return lcm;

	
	
};
 main _program{
	 int a,b;
	 cin>>a>>b;
	 cout<<LCM;}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>

int LCM(int A, int B){
	int k = A;
	int j = B;
	int gcd;
	int ans;
	while(True){
		int n = A;
		int m = B;
		if(B/A>0){
			B = n;
			A = m%n;
		}

		if(A==0){
			gcd = B ;
		break;}
			
	}
	ans = j*k/gcd;
	return ans;
}

main_program{
	int A,B;
	cin >> A >> B;
	cout << LCM(A,B);
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int main(){
	int A,B;
	cout<<A<<B<<endl;
	int i=1;
	double result=1;
	if(A && B % i==0; A || B % i==0)
		i=i+1;
	result=i*(i+1)
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>

void LCM(int A, int B, int &ans){
		int remainder;
		int x=A, y=B;
		while(A%B!=0){
			remainder=A%B;
			A=B;
			B=remainder; }
		ans=(x*y)/B;
}

int main(){
	int a,b,c;
	cin>>a>>b;
	LCM(a,b,c);
	cout<<c;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
int lcm(int a,int b){
	int p=a*b;
	int lcm;
	int gcd,temp;
	while(a%b!=0){
		temp=b;
		b=a%b;
		a=temp;
	}
	gcd=b;
	
	lcm=p/gcd;
	return lcm;
}

main_program{
	int a,b,ans;
	cin>>a>>b;
	if (b>a){
		ans=lcm(b,a);
	}
	else{
		ans=lcm(a,b);
	}
	cout<<ans<<endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
float GCD ( int A, int B ){
float C;
while( A % B !=0){
int Remainder= A%B ;
A=B ;
B =  Remainder;

}

return B;
}

float LCM ( int A , int B) {
int C = GCD(A,B) / (A*B);
return C;
}

main_program{
int A, B;
cout<< LCM(A,B) << endl;
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simp[lecpp>
main_program{
	int a,b;
	cin>>a>>b;

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include <simplecpp>
main_program{
	int n,a;
	int b=c=i=d=0;
	cin>>n;
	if (n>3){
		repeat(n){
			cin>>a;
			b=a;
		}
		c=b;
		i=c;
	}
}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that takes two positive integers A and B as input, passes them to a function that computes the LCM, and finally prints the result in the main function.

Student submission:
#include<simplecpp>
int LCM(int m, int n)
{
	int a=m, b=n;
	while(m%n!=0){
		int remainder;
		remainder=m%n;
		m=n;
		n=remainder;
	}
	int G=n;
	n=b;
	m=a;
	int L=(m*n)/G;
	return L;
}
int main(){
	int A, B;
	cin>>A>> B;
	LCM(A, B);
	cout<<LCM(A, B);
	}

Grading criterion: Overall program correctness
Rating A: "Common requirements  of a Program are correct - i.e.
 
- header (includes, using namespace, etc)
- main syntax
- variables declaration
- overall syntax"
Rating B: Problems are present in the code(eg: printing unnecessary strings, missing semicolons & braces, wrong/missing declarations, wrong header files)
Rating C: 0
Rating D: 0
Assigned grade: A