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>
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
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 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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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:
nclude<simplecpp>
main_program
{
	int a,b;
	cin>>a>>b
}

Grading criterion: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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;

}
       
       

       main_program{
	       int m;
	       int n;
	      
	       cin>>m>>n;
	      
	cout<<(m*n)/gcd(m,n) <<endl;
}

Grading criterion: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C
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: Quality and number of Comments
Rating A: Well Commented and Formatted
Rating B: Ok Commented or Ok Formatted
Rating C: Poor Comments and Formatting
Rating D: 0
Assigned grade: C