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 lcm(int A, int B){
	while (A%B!=0){
	int remainder=A%B;
	A=B;
	B=remainder;
	}
	return (A*B)/B;
}
	
main_program{
	int A,B;
	cin>>A>>B;
	cout<<lcm(A,B);
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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>
unsigned int lcm(unsigned int a,unsigned  int b)
{
	unsigned int l=a>b?a:b;
	while(!(l%a==0 && l%b==0))
	{
		l++;
	}
	return l;
}

main_program
{
	unsigned int n1,n2;
	cin>>n1>>n2;
	cout<< lcm(n1,n2);
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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;

	int lcm ( int n, int m)
	{ 
		int rem, k;
		while ( rem !=0 )
		{
			k =n;
			rem = m%n;
	       		m =n;
			n=rem;
		}
	int x= a*b/k;
	return x;
	}

	cout << lcm (a,b);
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 term = a*b;
       int remainder;
while (a%b!=0){
remainder = a%b;
a=b;
b= remainder;}
return term/b;}
main_program{
	int a , b;
	cin >> a >> b;
	cout<<lcm(a,b);
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 LCMoftwoNumbers(int a,int b){
	int LCM,z,i=2;
	while (i<a){
        if (a%i==0&&b%i==0){
		z=a*b;
		LCM=z/i;
	       
	       z=LCM;
	}	
	i++;
         }
	return LCM;
}

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

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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){
	if(b>a){
		int temp;
		temp = a;
		a = b;
		b = temp;
	}
	int p =a*b;
	while(a%b != 0){
		int remain = a%b;
		a=b;
		b=remain;
	}
	int l =p/b;
	return l;

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

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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;
	int lcm = A;
	while(lcm % B != 0){
		lcm = lcm + A;
	}
	cout << lcm;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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) {
  while(m%n != 0) 
     {int Remainder = m%n;
	     m=n;
	     n=Remainder;}
     return n;
}

int LCM(int a, int b) {
	return (a*b)/GCD(a,b);}
main_program {
	int x;
      	int y;

	cin >> x >> y;

	if(x>=y) {
	cout << LCM(x,y);}
	else {cout << LCM(y,x);}
     
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 m,n;
	cin>>m;
	cin>>n;
	while(m%n!=0){
		int remainder;
		remainder=m%n;
		m=n;
		n=remainder;
	}
	cout<<"lcm is :"<<m*n/remainder;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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, remainder = 1, hcf, prod;
	cin>>a>>b;
	prod = a*b;
	while(remainder != 0)
	{
		remainder = a%b;
		a = b;
		b = remainder;
	}
	hcf = a;
	cout<<prod/hcf<<endl;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 n,int m)
{
	int a =n;
	int b=m;
	int remainder;
	while(n%m!=0)
	{
		remainder = n%m;
		n=m;
		m =remainder;
	}
	return((a*b)/m);
}
main_program
{
	int n,m;
	cin>>n>>m;
	if(n>m)
	cout<<lcm(n,m);
	else
		cout << lcm(m,n);
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 x;
if(m>n)
x=n;
else
x=m;
int l;
int gcd;
for(int i=1; i<=x; i++)
{
if(m%i==0 && n%i==0)
gcd=i;
}
l= (m*n)/gcd;
return l;
}
main_program
{
int a,b;
cin>>a>>b;
cout<<lcm(a,b)<<endl;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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;
	int i=1;
	while(i*a%b!=0){
		i++;
	}
	int n=i*a;
	cout<<n<<endl;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 n1,n2;
int func(int n1 , int n2)
if(n1>n2){
	n1=n1-n2;
}
if(n2>n1){n2=n2-n1;}
if(n1=n2) break;

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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){while (m%n!=0){ int remainder = m%n;
	                 m=n;
			 n=remainder;}
			 return(n);}
int lcm(int &n , int &m){int l = m*n/gcd(n,m);
	                 return l;}
main_program{
	int n,m; cin>>n>>m;
	cout<<lcm(n,m);}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 remainder;
	if(m>n && m%n==0){
		return m;}
        if(n>m && n%m==0){
		return n;}
        if(m>n && m%n!=0){
		while( m%n!=0){
			remainder = m%n;
			m=n;
			n=remainder;
		
	 return (m*n)/remainder;}
	}
		 if(n>m && n%m!=0){
			while( n%m!=0){
		        remainder = n%m;
			n=m;
			m=remainder;
			
		      	return (m*n)/remainder;}
		 }
}
		
main_program{
	int A,B,l;
	cin>>A>>B;
	l = lcm(A,B);
	cout<<l<<endl;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 c=b;
	while(a%b!=0){
		int t;
		t=a%b;
		a=b;
		b=t;}
	b=a*c/b;
	return(b);
}
main_program{
	int m,l;
	cin>>m>>l;
	cout<<LCM(m,l);
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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;
	while(m%n!=0){
		remainder=(m%n);
		m=n;
		n=remainder;}
	return n;}
main_program
{int m,n;
	cin>>m>>n;
        int lcm;
	lcm=m*n/gcd(m,n);
	cout<<lcm;}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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;
	while(m%n !=0)
	{
		remainder = m%n;
		m=n;
		n=remainder;
	}
	return n;
}

int lcm(int a, int b)
{

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

	int a,b;
	cin>>a>>b;

	cout<<lcm(a,b)<<endl;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 gcd(int m, int n)
{
	while(m%n!=0)
	{
		int r=m%n;
		m=n;
		n=r;
	}
	return n;

	lcm(int m,int n)= m*n/gcd(int m, int n)
}
main_program
{
	int x,y;
	cin>>x>>y;
	lcm(x,y);

}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 rem, result;
	result = a*b;
	while(b%a!=0)
 {
  rem=b%a;
  b=a;
  a=rem;
 }
	result = result/a;
	return result;
}
main_program
{
 int num1, num2;
 cin>>num1>>num2;
 cout<<lcm(num1,num2)<<endl;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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,x,y;
	cin>>a>>b;
	int rem;
	a=x;
	b=y;
	while(rem!=0){
		rem=y%x;
		y=x;
		x=rem;
	}
	cout<<(a*b)/rem;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 number;
       	if(b>a)
	 number=b;
		else number=a;
	while(true)
	
	if (number%a==0 && number%b==0)
		break;
		else ++number;
		return number;

}
main_program{
	int c,d;
	cin>>c>>d;
	lcm(c,d);
	cout<<lcm(c,d);
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 p,int q){
	int x=p;
	int y=q;
	int rem;
	while(p%q!=0){
	rem=p%q;
	p=q;
	q=rem;}
	return (x*y)/q;}
main_program{
	int A,B;
	cin>>A>>B;
	if (A<B){
	cout<<LCM(A,B)<<endl;
	}
	else if(A>B){
		cout<<LCM(B,A)<<endl;
	}
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 hcf(int n1,int n2){
	int r;
	while(n1%n2>0){
		r=n1%n2;
		n1=n2;
		n2=r;
	}
	return n2;
}

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

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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)
{while(m%n!=0){ 
int remainder=m%n;
m=n;
n=remainder;}
return n;}
main_program{
int lcm,a,b;
cin>>a>>b;
lcm=a*b/gcd(a,b);
cout<< lcm<< endl;}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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_main {
float x,y;
cout<<"enter two numbers"<<endl;
  cin>>"x,y">>;
x=(2^-2)+(2^-1)+(2^0);
if(x=y) {
cout<<"y is decmal form of x"<<endl;
}
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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(double a,double b){
	double m;
	if(b/a!=0){
	m=b-a;
	b=a;}
	else if(b/a==0){ m=a;}
	return m;
	}

main_program{
	int x,y,p,q,w;
	cin>>x>>y;
	p = gcd(x,y);
	q = x*y;
	w= q/p;
	cout<<w<<endl;
}

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 x,int y)
{
	int ans=0;
	if(x>y)
	{
	for(int i=x;i<=(x*y);i++)
	{
		if(i%x==0 && i%y==0)
		{
			ans=i;
			break;
		}
	}
	}
	else 
	{
		for(int i=y;i<=(x*y);i++)
        {
                if(i%x==0 && i%y==0)
                {
                        ans=i;
                        break;
                }
        }

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

Grading criterion: Placeholder for penalty to be given for any reason
Rating A: Maximum penalty
Rating B: no penalty
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 LCM(int n, int m)
	{
	intx;
	if(m>n)
		x=n;
	int gcd;
	}

}

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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,i,j;
	cin>>a>>b;
	for(i>0,i<a,i++){
		if(a%i=0){
                cout<<i;}
	}
	for(j>0,j<b,j++){
		if(b%j=0{
		cout<<j;}
		}
		int g;
		if(i<j){
		i=g};
		else{j=g};
		
cout<<a*b/g<<endl;

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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 k = m*n;
	while(m%n!=0){
		int temp = m%n;
		m = n;
		n = temp;
	}
	return k/n;
}
main_program{
	int A,B;
	cin>>A>>B;
	cout<<lcm(A,B);
}

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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;
	int p=a,q=b;
	while (b%a!=0){
		int r=b%a;
		b=a;
		a=r;
	}
	int lcm=(p*q)/a;

	cout<<lcm;
}

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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) {
	int x = (a*b)/gcd(a,b);
	return x;
}
main_program {
	int a,b;
	cin >>a >>b;
	cout <<lcm(a,b) <<endl;
}

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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 product= a*b;
	int c =b;
	if(a<b){
		b=a;
		a=c;
	}

	while(a%b!=0){
		int r = a%b;
		a=b;
		b=r;
	}

	int hcf = b ;
	int x = product/hcf;

	return x;
}

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

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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=n%m;
      
	      if(n%m !=0) {
		n=m;
	 
		m=remainder;
	     }
   
	return m;
	}
int lcm (int m , int n) {
int 	lcm_nu=(m*n)/gcd(m,n);
	return lcm_nu;
}
main_program {
	int A, B;
	cin>>A>>B;
	cout<<lcm(A,B);
}

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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;
	while (m%n !=0){
		Remainder = m %n;
		m =n;
		n = Remainder;
	}
	return n;
}
main_program{

	int A,B;
	cin >> A>> B;
	cout <<A*B/ gcd (A,B) << endl;
}

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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;
	int LCM(A,B);
	LCM(A,B) = A*B;
	int result;
	result = LCM(A,B);
}

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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 i,c;	for(i=1; (a*i)%b!=0;i++){c=a*(i+1);}
	return c;
}
main_program{
	int A,B;
	cin>>A>>B;
	cout<<lcm(A,B)<<endl;
}

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
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);
    {
	while(m % n != 0)
	{
		int r = m % n;
		m=n;
		n=r;
	}
	return n;
    }
	int lcm(int m,int n);
	{
	return m*n/gcd(m,n);
        }
main_program
   {
	int m,n;
	cin>>m>>n;
	cout<<lcm(m,n)<<endl;
   }

Grading criterion: is LCM calculated using GCD of numbers?
Rating A: if the GCD of numbers is correctly calculated and was used to find the LCM of numbers
Rating B: if GCD is not used to calculate the LCM of numbers
Rating C: 0
Rating D: 0
Assigned grade: B