CodeGraderBench/CodeGraderBench huggingface dataset:
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 result1,result2,result;
	result1 =1.0*pow(a,5) -3.0*pow(a,4)*b  +4.0*pow(a,2)*pow(b,3) -5.0*a*pow(b,4)+ 1.0*pow(b,5);
	result2 = (a-b)*1.0;
	result = result1/result2;
	cout<< result<< endl;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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;
	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<<endl;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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)<<endl;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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{
        turtlesim(100)
        repeat(3){
               forward(100);
               left(120);
        }
        left(120);
        forward(10);
        right(120);
        forward(200)
        right(120);
        forward910);
        wait(5);
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
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,r;
	cin>>a>>b;
	if(-10<=a && b<=10)
	{ r= (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<< r;}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 x,y,z,w,p;
	x = a*a*a*a*a;
	y = 3*a*a*a*a*b;
	z = 4*a*a*b*b*b;
	w = 5*a*b*b*b*b;
	p = b*b*b*b*b;

	cout << (x-y + z - w + p)/(a-b);
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 {
	double a,b,c,d,e,f,g;
	 cin>>a>>b;
	 c=pow(a,5);
	 d=3*pow(a,4)*b;
	 e=4*pow(a,2)*pow(b,3);
	 f=5*a*pow(b,4);
	 g=pow(b,4);
	  
	 cout<<(c-d+e-f+g)/(a-b);

}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
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 <iostream>
#include <cmath>
using std::cout;
using std::cin;

int main(){
	float a,b,result;
	cin >> a >> b;
	float x = pow(a,5);
	float y = pow(a,4);
	float z=pow(a,2);
	float c = pow(b,3);
	float d = pow(b,4);
	float e = pow(b,5);
	result = (x-(3*y*b) + (4*z*c) - (5*a*d) + e)/(a-b);
	cout << result;	
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 e1,e2,e3,e4,e5,n,d,ans;
	e1 = a*a*a*a*a;
	e2 = 3*a*a*a*a*b;
	e3 = 4*a*a*b*b*b;
	e4 = 5*a*b*b*b*b;
	e5 = b*b*b*b*b;
	n = e1-e2+e3-e4+e5;
	d = a - b;
	ans = n/d;
	cout << ans;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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;
	float result;
	cin>> a>> b;
	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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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>
int main(){
      double a,b;
      cin>>a>>b;
      double c,d;
      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);

double e=c/d;
cout<<e<<endl;


}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 = 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;
	cout<<c/d;



	
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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<iostream>
using namespace std;
int main()
{
float a, b , exp;
cin>>a>>b;

if(a!=b && a>=-10 && b<=10)
{
       	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;
}

else
{
    cout<<" ";
}

}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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<iostream>
using namespace std;
int main(){
	float  a,b,s,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;
	s=x/y;
	cout<<s;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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,r,sum;
	cin>>a>>b;
	r=a/b;
	cout<<r<<endl;
	sum=(((r*r*r*r*r)-(3*r*r*r*r)+(4*r*r)-(5*r)+1)/(r-1))*b*b*b*b;
	cout<<sum<<endl;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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;
	float b;
	cin >> a >> b;
	float SUM;

	SUM=(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 << SUM;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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;
        float b;
        float exp;
        cin >>a>>b;
        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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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, result;
	cin >> a >> b;
	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);
	cout << result << endl;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 sum = (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 low = a-b;

    if(-10<= a && a<= 10 && b<=10 && -10<=b){
        if(low != 0){
            float result = sum/low;
            cout << result<<endl;
        }
    }
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 {
          int num = i
              i = (a,b);
              cin>>(<=-10);
              cin>>(<=10);
              cout<<(a,b);
          cin>>(-10<= <=10);
           cout<<(a is not equal);
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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;
	float d = b*b*b*b*b;
        float e = a*a*a*a;
	float f = b*b*b*b;
        float g = a*a;
	float h = b*b*b;
        cout << (c-(3*e*b)+(4*g*h)-(5*a*f)+d)/(a-b);
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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;
	float 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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 t1,t2,t3;
t1=pow(a,5)-(3*(pow(a,4))*b)+(4*pow(a,2)*pow(b,3))-(5*a*pow(b,4))+pow(b,5);
t2=a-b;
t3=t1/t2;
cout<<endl<<t3;


}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 ,sum;
	cin>>a;
	cin>>b;
       
	if( (a==-10 || a > -10)  &&  (b==10 || b< 10)) {
	sum=( 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 << sum ;
	}
	else if (a==b) {
		cout<<" wrong input";

}
else
cout<< "wrong input";
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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,res;
	cin>>a>>b;
	if(a<=10 && b<=10 && a>=-10 && b>=-10 && a!=b){
		res=(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<<res;
		}


}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 = ( (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 << endl;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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,ans;
	cin>>a>>b;
	if(a>=-10 && b<=10 && a!=b){
		ans=((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<<ans;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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;
	float k,j;
	cin>>a>>b;
	

if (a!=b)
	{
		k=(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)
	;	j=a-b;
		cout<<k/j<<"\n";
	}
	else
		cout<<"\n";
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Terms Calculated correctly but error in final answer, or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A