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){
	int x = a;
	int y = b;
	while(a%b!=0){
		int remainder = a%b;
		a = b;
		b = remainder;
	}
	int l =x * y /b;
	return l;
}
main_program{
int a, b;
cin>>a>>b;
if (a>b) {cout<<LCM(a,b);}
else cout<<LCM(b,a);
}

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 (b);
}
int main(){
	int a,b;
	cin>>a>>b;
	cout<<(a*b)/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
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;
}

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 n1 = a, n2 = b, gcd = 0;
		while (a%b >0) {
			if (b-a >0)
			b = b-a;
			else b = a -b;
			gcd = b;
			
		}
		int answer  = (n1*n2)/gcd;
		return answer;
	}
 main_program {
	 int x1; cin >> x1;
	 int x2; cin >> x2;
	 cout << lcm (x1, x2);


 }

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 x1, int x2)
{
	int rem;
	int m = x2 , n = x1;
	while(x2 % x1 != 0)
	{
		rem = x2 % x1;
		x2 = x1;
		x1 = rem;
	}

	int ans= (m*n) / x1;
	return ans;
}
main_program
{
	int a,b;
	int an;
	cin>>a>>b;
	if(a>b)
	{
		 an = lcm(b,a);
	}

	else
	{
		an = lcm(a,b);
	}

	cout<<an;
}

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 num1,int num2){
	int lim=min(num1,num2);
	int hcf;
	for(int i=1;i<=lim;++i){
		if(num1%i==0 && num2%i==0)
			hcf=i;
	}
	return (num1*num2)/hcf;
}
main_program{
	int num1,num2;
	cin>>num1>>num2;
	cout<<lcm(num1,num2)<<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 remainder=0;
	int q=m;
	if (m%n == 0) cout<<m<<endl;
	else 
	while(m%n >0){
		remainder=m%n;
		m=n;
		n=remainder;
	}
        cout<<m*q/n<<endl;
        return 0;
}
int main(){
	int A,B;
	cin>>A>>B;
	lcm(A,B);
	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 gcd( int a,int b){
	while(a%b!=0){
		int r=a%b;
	        a=b;
		b=r;
	}
	return b;
}
int lcm(int a , int b){
	return a*b/gcd(a,b);
}
main_program{ 
	int c,d;
	cin>>c>>d;
	cout<< lcm(c,d);
}

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 m , int n ){
	return m*n/gcd(m,n);
}

int main(){
	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 a,b; cin>>a>>b;// b>a
		int m=b,n=a;
	while(m%n !=0)  {
		int remainder=m%n;
		m=n;
		n=remainder;
	}
	
	int lcm= (a*b)/n;
	cout<< lcm<<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 a,b,A,B,lcm;
	cin>> a>>b;
	A=a;
	B=b;
	
		while(b%a != 0){ 
			int rem;
		rem =b%a;
		b=a ;
		a=rem;
		}
		lcm=(A*B)/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:
#include<simplecpp>
	int gcd(int n,int m){
		int remainder;
		while(m%n !=0){
			remainder=m%n;
			m=n;
			n=remainder;
		}
		return n;
	}
int lcm(int n, int m){
	int k;
	k=(n*m)/gcd(n,m);
	return k;
}
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
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 m,n,remainder;
	m=a; n=b;
	while(m%n!=0){
		remainder =m%n;
		m=n;
		n=remainder;
	}
	return a*b/n;
}
int main(){
	int x,y; cin>>x>>y;
	cout<< lcm(x,y) << 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 gcd;
	if(a%b==0){
		gcd=b;}
	lcm=((a*b)/gcd);
	return lcm;
	}
main_program{
	int m, n;
	cin>>m>>n;
	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: 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 Remainder=a%b;
		a=b;
		b=Remainder;
	}
	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>


int lcm(int a, int b){
	int d=b;
	while(d%a != 0 || d%b != 0)
	d++;
	
	return d;
}
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>
main_program{
	int a,b,t=1,p,q;
	cin>>a>>b;
	while(true){
		p = t%a;
		q = t%b;
		if (p==0&&q==0){
		       	cout<<t;
		       	break;
		}
		else t+=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: 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 c,int d,int GCD)
{
int 	lcm=c*d/GCD;
return lcm;}
int gcd
(int a,int b)
{
while(a%b!=0)
{	int rem=a%b;
a=b;
b=rem;
}

return b;

}
main_program{
	int A,B;
	cin>>A>>B;
	int GCD=gcd( A, B);
	int lcm=LCM(A,B,GCD);
	cout<<endl<<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>
int LCM(int a, int b) {
	int remainder;
	int l;
	l = a*b;
	while ( b % a != 0){
		remainder = b % a;
		b = a;
		a = remainder;
	}
	int r;
	r = l / a;
	return r;
	
}
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 m, int n){
	cin >> m >> n;
	int i;
	for(i=1; i>0; i++){
		while( i%m == 0 && i%n == 0){
			cout << i << endl;
			break;
		}
	}
	return i;
}

main_program{
	int A, B;
	cin >> A >> B;
	lcm(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
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 get_lcm(int m, int n)
{
	int a=m, b=n;
	while(a%b!=0)
	{
		int rem=a%b;
		a=b;
		b=rem;
	}
	int lcm=m*n/b;
	return lcm;
}

main_program
{
	int A,B;
	cin>>A>>B;
	cout<<get_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>
main_program{
	int A,B;
	cin >> A>>B;
	int LCM;
	LCM=60;
	cout<<LCM<<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) {

	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: 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 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: 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)     //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: 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: 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: 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 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: 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){
                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: 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 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: 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;
cout<<"

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;
	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: 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;
	
       	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: 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, 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: 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,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: 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:
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: 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;
	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: 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 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: 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 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: 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