CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>

main_program{
int n;
cin>>n;
if((n<0)&&(n%2==0)){
cout<<n/2<<endl;
}
if((n<0)&&(n%2!=0)){
cout<<n*n<<endl;
}
if((n>0)&&(n%2==0)){
cout<<n*(0.33333333333333)<<endl;
}
if((n>0)&&(n%2!=0)){
cout<<n*n*n<<endl;
}
if(n==0){
cout<<00<<endl;
}








}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>

main_program{

    int n;
    cin>>n;     // Initialize n and take value from user..

    if (n<0){  // If n is negative...

        if ((n%2) == 0){      // n is even..
            int result = n/2;
            cout<<result;    // compute result and print..
        }
        else{              // n is odd..
            long int result = n*n;      // long int as sqaure value can have large value..
            cout<<result;        // Print the result..
        }

    }

    else if (n>0){    // n is positive..

        if ((n%2) == 0){     // n is odd..
            float tempn = n;   // made another variable with float value same as n as n/3 may have some remainder otherwise...
            float result = tempn/3; 
            cout<<result; // Calculate and print float result...
        }
        else{
            long unsigned int result = n*n*n;  // long int as cube can be a very large value and unsigned beacuse n>0..
            cout<<result;    // Print the result..
        }
    }

    else{ // For n = 0 case..
       
        repeat(2){          // print 2 times..
            cout<<0;        // print 0
        }
    }

}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program
{
int n;
cin>>n;
if(n>=(-1000) && n<=(1000))
	 {
	 if ( n<0 && n%2==0)
		  {
		  cout<<n/2;
		  }
	 else if (n<0 && n%2!=0 )
		  {
		  cout<<n*n;
		  }
	 else if(n>0 && n%2==0)
		  {float k=n;
		  cout<<k/3;
		  }
	 else if(n>0 && n%2!=0)
		  {
		  cout<<n*n*n;
		  }
	 else  
	 	 {
		 cout<<"00";
		 }
	 }
}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin>>n;
	if(n<0 && n%2 ==0)
	{
		float r = n/2.0;
		cout<<r;
	}
	else if(n<0)
		cout<< n*n;
	else if(n >0 && n%2 == 0)
	{
		float a = n/3.0;
		cout<<a;
	}
	else if(n >0)
		cout<< n*n*n;
	else
		cout<<"00";
}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
    int n;
    cin>>n;
    if(n==0) cout<<"00";
    else if (n<0){
        if(n%2==0) cout<<(n/2.0);
        else cout<<(n*n);
    }
    else if(n>0){
        if(n%2==0) cout<<(n/3.0);
        else cout<<(n*n*n);
    }
}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin >> n;
	
	double b;
	if(n<0 && n%2==0){
		b = n/2;
		cout << b;
	} else if(n<0 && n%2!=0){
		long int d = n*n;
		cout << d;
	} else if(n>0 && n%2==0){
		b = n/3.0;
		cout << b;	
	} else if(n>0 && n%2!=0){
		long int c = n*n*n;
		cout << c;
	} else if(n==0){
		cout << 0<< 0;
	}
}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{

	int n;
	cin>>n;
	long double ans;

	if ( n == 0 ){
		cout<<"00";
	}

	else if (( n > 0 ) && ( n % 2 == 0)) {
		ans = n/3.0;
		cout<<ans;
	}

	else if (( n > 0 ) && ( n % 2 != 0)) {
		ans = n * n * n;
		cout<<ans;
	}

	else if (( n < 0 ) && ( n % 2 == 0 )){
		ans = n/2;
		cout<<ans;
	}

	else if (( n < 0 ) && ( n % 2 != 0 )){
		ans = n * n;
		cout<<ans;
	}
}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{

	int n;
	cin>>n;

	if(n>0){
	
	if(n%2==0){
	
		double x;
		x=n/3.00;
		cout<<x;
	}
	else if(n%2==1){
	cout<<n*n*n;
	}
			}

	if(n<0){
 
         if(n%2==0){
	 
		 cout<<n/2;
	 }     	

	 else{
	 
		cout<<n*n;
	 
	 }

	}


	if(n==0){
		cout<<"00";
	}

}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	long long int n;
	cin>>n;
	if(n<0&&n%2==0){
		cout<<n/2.0;}
	else if(n<0&&n%2!=0){
		cout<<n*n;}
	else if(n>0&&n%2==0){
		cout<<n/3.0;}
	else if(n>0&&n%2!=0){
		cout<<n*n*n;}
	else if (n==0){
		cout<<"00";
	}
}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program 
{
	int n = 0;
	cin >> n;
	if(n<0 and n%2==0)
	{
		cout << n/2;
	}
	 else if(n<0 and n%2!=0)
	 {
	 	cout << n*n;
	 }

	else if (n>0 and n%2==0)
	{
		cout << n/3.0;
	}

	else if (n>0 and n%2!=0)
	{
		cout << n*n*n;
	}

	else
	{
		cout <<0<<0;
	}
}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin>>n;
	if(n<0&&n%2==0){
		cout<<n/2;
	}
	if(n<0&&n%2!=0){
		cout<<n*n;
	}
	if(n>0&&n%2==0){
		cout<<n/3.0;
	}
	if(n>0&&n%2!=0){
		cout<<n*n*n;
	}
	if(n==0){
		cout<<"00";
	}}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program
{
int a;
cin>>a;
if(a==0;)
{cout<<00;}
int b=-1*a;
if(a>>0 && a%2==0)
{cout<<a/3.0;}
if(a>>0 && a%2=!0)
{cout<<a*a*a;
}
if(b>>0 && a%2==0)
{cout<<-b/2.0;}
if(a>>0 && a%2=!0)
{cout<<b*b;
}

Grading criterion: Positive Odd
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include <simplecpp>
main_program{
	float a , b, c , d ;
	cin >> a>>b;
	c= (a*a*a*a*a)-(3*a*a*a*a*b)+(4*a*a*b*b*b)-(5*a*b*b*b*b)+(b*b*b*b*b) ;
	d = a-b ;
	cout << 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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
float a,b;
cin>>a>>b;
float exp = (a*a*a*a*a -3*a*a*a*a*b + 4*a*a*b*b*b - 5*a*b*b*b*b + b*b*b*b*b)/(a-b);
cout<<exp;

}

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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a,b,x,y;
	cin>>a>>b;
        x=a*a*a*a*a-3*a*a*a*a*b+4*a*a*b*b*b-5*a*b*b*b*b+b*b*b*b*b;
	y=a-b;
	cout<<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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{float a,b;
	double c;
	cin >> a >> b;
	c=((pow(a,5))-(3*(pow(a,4))*(b))+(4*(pow(a,2))*(pow(b,3)))-(5*(a)*(pow(b,4)))+(pow(b,5)))/(a-b);
		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: B
Problem: Write a C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a, b;
	cin >> a >> b;
	float c=(a*a*a*a*a - 3*a*a*a*a*b + 4*a*a*b*b*b - 5*a*b*b*b*b + b*b*b*b*b)*(1.0)/(a-b);
	if ((a>= -10) && (a<=10) && (b>= -10) && (b<=10)){
		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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a,b;
	cin>>a>>b;
	float num1=(a*a*a*a*a)-(3*a*a*a*a*b)+(4*a*a*b*b*b)-(5*a*b*b*b*b)+(b*b*b*b*b);
	float num2=(a-b);
	float value=num1/num2;
	cout<<value;
}

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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float x,a,b;
	cin>>a>>b;
	if (a!=b){
x=a*a*a*a*a;
x=x-a*a*a*a*b*3;
x= x+ 4*a*a*b*b*b;
x= x-5*a*b*b*b*b;
x= x+b*b*b*b*b;
x=x/(a-b);
	}

cout<<x;
}

// x+4*ai*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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a,b;
	cin >> a >> b;
	cout << (a*a*a*a*a - 3*a*a*a*a*b + 4*a*a*b*b*b -5*a*b*b*b*b +b*b*b*b*b)/(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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
float a,b;
cin>>a>>b;
float y;
y=(pow(a,5)-3*pow(a,4)*b+4*pow(a,2)*pow(b,3)-5*a*pow(b,4)+pow(b,5))/(a-b);
cout<<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: B
Problem: Write a C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{

float a,b;
cin>>a>>b;
cout<<((a*a*a*a*a)-(3*a*a*a*a*b)+(4*a*a*b*b*b)-(5*a*b*b*b*b)+(b*b*b*b*b))/(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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include <simplecpp>
main_program {
float a,b;
cin>>a;
cin>>b;
float n,d;
n=pow(a,5)-3*pow(a,4)*b+4*pow(a,2)*pow(b,3)-5*a*pow(b,4)+pow(b,5);
d=a-b;
if (-10<=a&&b<=10&&a!=b){cout<<n/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: B
Problem: Write a C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a, b;
	cin >> a >> b;

	float result;
	result = (pow(a,5) -((3*(pow(a,4)))*b) + ((4*(pow(a,2)))*(pow(b,3))) - ((5*a)*(pow(b,4)))+ pow(b,5))/((a-b)*1.0);

	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: B
Problem: Write a C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a,b;
	cin>>a>>b;
	float c;
	c=((a*a*a*a*a)-(3*a*a*a*a*b)+(4*a*a*b*b*b)-(5*a*b*b*b*b)+(b*b*b*b*b))/(a-b);
	cout<<c<<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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a,b;
	cin>>a>>b;
	cout<<(pow(a,5)-3*pow(a,4)*b+4*pow(a,2)*pow(b,3)-5*a*pow(b,4)+pow(b,5))/(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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a,b,c,d,e,f,g,h,s;
	cin >> a >> b;
	c = a*a*a*a*a;
	d = 3*a*a*a*a*b;
        e = 4*a*a*b*b*b;
        f = 5*a*b*b*b*b;
        g = b*b*b*b*b;
        h = a-b;
        s = (c-d+e-f+g)/h;
        cout<<s<<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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include <simplecpp>
main_program{
	float a,b;
	cin>>a>>b;
	if(-10<=a && b<=10 && a!=b)
	{
	float s= (pow(a,5)-3*pow(a,4)*b+4*pow(a,2)*pow(b,3)-5*a*pow(b,4)+pow(b,5))/(a-b);
	cout<<s;
	}
}

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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>
main_program{
	float a , b ;
	cin>>a>>b;
	float result;
	if((a>=-10) && (b<=10) && ((a-b) !=0)){
		result=(a*a*a*a*a - 3*a*a*a*a*b + 4*a*a*b*b*b - 5*a*b*b*b*b + b*b*b*b*b)/(a - b)  ;
		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 C++ program to accept two floating point numbers from the user, a and b, and evaluate the expression and print the result:  (a5 - 3a4b + 4a2b3 - 5ab4 + b5) / (a -b). Print the computed value of the expression

Constraints (Assume)-10 <= a, b <=10a is not equal to b(a-b) is never 0

Student submission:
#include<simplecpp>


main_program{

	float a , b , x , y;

	cin >> a >>  b ;


	x = (a*a*a*a*a - 3.0*a*a*a*a*b + 4.0*a*a*b*b*b -5.0*a*b*b*b*b + b*b*b*b*b)  ;

	y = a - b ; 


	cout << 1.0*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