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 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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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, 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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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,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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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:
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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<simp[lecpp>
main_program{
	int a,b;
	cin>>a>>b;

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 rem;
	while(m%n !=0) {
	rem=m%n;
	m=n ;
	n=rem ;
	}
	return n ;
}
main_program {
	int a , b ;
	cin>>a>>b;
	cout<<(a*b)/gcd(a,b);
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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);
main_program
{
 int a, b;
 cin>>a>>b;
 cout<<LCM( a,b);
 }
 int LCM( int a,int b)
 {
 	int h=a;
 	int k=b ;
 int remainder;
 while( a%b!=0)
 {
  remainder = a%b;
  a=b;
  b=remainder;
  }
  return ( h*k/b);
  }

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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){
	while(a%b==0){
		return a;
	}
	while(b%a==0){
		return b;
	}
	int i,c;
	while  (a>=b){
		while(c%b!=0){
		c=a*i;
		i+=1;
		}
		return c;
	}
	while(a<=b){
		while(c%a!=0){
		c=b*i;
		i+=1;
		}
		return c;
	}
	
}
int main(){
	cout<<lcm(a,b);
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 r;
             while (m%n>0){ r= m%n;
	      m=n;
	      n=r;
	     }return n;}
int lcm(int m,int n){int z;
	z=m*n/gcd(m,n);
	return z;}
	     main_program{int m,n;
		     cin>>m>>n;
		     cout<<lcm(m,n)<<endl;}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 s , a, b;
	cin>>a >> b;
	
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 hc( int a, int b){
		int Remainder;
		int HCF;
		while(a!=b){
			remainder=b%a;	
			b=a;
			a=Remainder;
		}
		HCF=b;
		return HCF;
	}
int LCM(int a1, int b1){
	int lc=a1*b1/hc(a1,b1);
	return lc;
}
main_program{
	int m,n;
	cin>>m>>n;
	int ans=LCM(m,n);
	cout<<ans<<endl;
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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){
		m=n;
		n=m/n;
	}
	return n;
}
int lcm(int a, int b){
	int n= a*b/gcd(a,b);
	return n;
}
main_program{
	int x1,x2,X;
	cin>>x1>>x2;
	X=lcm(x1,x2);
	cout<<X<<endl; 
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 i=1;
	while(true)
	{
		if(i%a==0 && i%b==0) break;
		i++;
	}
	return i;
}
int main()
{
	int x,y;
	cin>>x>>y;
	cout<<lcm(x,y);
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 i;
	while(b%a!=0){
		i=b%a;
		b=a;
		a=i;
	}
	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: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 m;
	while (b>0){
		m=a%b;
		a=b;
		b=m;
	}
	return a;
}
int lcm(int &c, int &d){
	int n,res,c_temp,d_temp;
	c_temp=c;
	d_temp=d;
	n=gcd(c,d);
	res=(c_temp*d_temp)/n;
	return res;
}

main_program{
	int p,n1,n2,t;
	cin>>n1>>n2;
	t=n1;
	if (n1<n2){
		n1=n2;
		n2=t;
	}
	p=lcm(n1,n2);
	cout<<p;
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 n=2,ans,q;
	q=b;
	while(a/n!=0 and b/n!=0){
		if(a%n==0 and b%n==0){
			a=a/n;
			b=b/n;
			n++;
		}
		else{
			n++;
			continue;
		}
	}

	

	ans = a*q;

	return ans;
}

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

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 A,B,lcm,gcd,z;
int lcmfunction(int A,int B){


cin>A,B;

z=A*B;

	while(A%B=0){
		
	A=B;
		B=A%B;
	gcd=B;
	};
		
	lcm=z/gcd;
}

main_program{

		cout<<lcmfunction(A,B);
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
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 gcd(int n, int m)
{
	int rem;
	while (m%n != 0)
	{
		rem = m%n;
 		m = n;
		n = rem;
	}
	return n;
}	
int main()
{
	int n1, n2;
	cin >> n1 >> n2;
	int hcf = gcd(n1, n2);
	cout << (n1*n2)/hcf;
}

Grading criterion: is LCM function returning value to main function
Rating A: if LCM is returning value correctly to main function
Rating B: if LCM function is not returning value correctly
Rating C: 0
Rating D: 0
Assigned grade: B