CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	float x1 , x2;
	cin >> x1 , x2;
	float epsilon = 0.001;
	bool x1isPositive, xmIsPositive;
	x1isPositive = x1*x1*x1 - 6*x1*x1 +11*x1 - 6 >0;
	float xm;
	while (abs(x1-x2) > epsilon) {
		float xm = (x1 + x2)/2;
		xmIsPositive = xm*xm*xm - 6*xm*xm + 11*xm - 6 >0;
		if ( x1isPositive == xmIsPositive) x1 = xm;
		else x2 = xm;

	}
	cout << xm;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: A
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	float x1,x2,xm;
	cin>>x1>>x2;
	bool x1_positive , xm_positive;
	x1_positive=(pow(x1,3)-6*pow(x1,2)+11*x1-6)>0;

	if(x1==x2){
		xm=(x1+x2)/2;
		xm_positive= (pow(xm,3)-6*pow(xm,2)+11*xm-6)>0;
		if(x1_positive== xm_positive){
			x1=xm;
		}
		else x2=xm;
	}
	cout<<x1<<endl;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: A
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	double x1,x2;
	cin>>x1>>x2>>endl;
        if(x1>=-100&&x1<=100){
		double f;
		f=pow(x1,3)-6*pow(x1,2)+11*x1-6;
		}
if(x2>=-100&&x2<=100){
		double g;
		g=pow(x2,3)-6*pow(x2,2)+11*x2-6;
	
	}

	
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
float poly(float x){
	float fx;
	fx=pow(x,3)-(6*pow(x,2))+(11*x)-6;
	return fx;
}
main_program{
	float x1,x2;
	cin>>x1>>x2;

	while(abs(poly((x1+x2)/2))>0.000001){
			if((poly(x1))*poly((x1+x2)/2)<0){
			x2=(x1+x2)/2;

			}
			else{
			       	x1=(x1+x2)/2;
	
			}
			}
	cout<<fixed;
	cout.precision(3);
	cout<<(x1+x2)/2;
	}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
double f(double x){
	double ans = x*x*x-6*x*x+11*x-6;
	return ans;
}
main_program{
	double x1,x2;
	cin>>x1>>x2;
	double x3 ;
	x3 = (x1+x2)/2;
	for(int i=1;abs(f(x3))>=0.0001;i++){
		x3 = (x1+x2)/2;
		if(f(x1)*f(x3) <=0){
			x2 = x3;
		}
		else{
			x1 = x3;
		}
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x3;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: A
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include <simplecpp>
main_program{
	float l,r,m,e=0.0001;
	cin>>l>>r;
       bool l_is_positive=(pow(l,3)-6*(pow(l,2))+11*l-6)>0;
       while((r-l)>e){
        m=(l+r)/2;

       bool m_is_positive=(pow(m,3)-6*(pow(m,2))+11*m-6)>0;
       if (l_is_positive == m_is_positive)
	       l=m;
       else 
	       r=m;
       }
       if (0.5<l && l<1.5)
	       cout<<"1.000";
       else if (1.5<l && l<2.5)
	       cout<<"2.000";
       else if (2.5<l && l<3.5)
	       cout<<"3.000";


}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	double x1,x2;
	cin>>x1>>x2;
	double xL=x1, xR=x2;
	double epsilon=0.0001;

	bool xL_is_positive=(( pow(xL,3)-6*pow(xL,2)+11*xL-6)>0);
	bool xR_is_positive=(( pow(xR,3)-6*pow(xR,2)+11*xR-6)>0);

	while((xR-xL)>epsilon){
		double xm=(xR+xL)/2;
		bool xm_is_positive=(( pow(xm,3)-6*pow(xm,2)+11*xm-6)>0);

		if(xL_is_positive==xm_is_positive) xL=xm;
		else xR=xm;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<xL;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: A
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	float x1,x2;
	int r1=1,r2=2,r3=3;
	cin>>x1>>x2;
	if (0<x1,x2<1){
		cout<<r1<<endl;
	}
	else if (1<x1,x2<2){
		cout<<r2<<endl;
	}
	else
	{
		cout<<r3<<endl;
	}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include <simplecpp>
main_program{
	float xrp,xm,xl,xr;
	cin>>xl>>xr;
	xm=(xl+xr)/2;
	xrp=(xm*xm*xm-6*xm*xm+11*xm-6);
	while(xrp!=0){
		while (xrp>0){
			xl=xm;
			xm=(xl+xr)/2;
		}
		while(xrp==0){
			cout<<xm;
			xm=(xl+xr)/2;
		}
		while (xrp<0){
			xr=xm;
			xm=(xl+xr)/2;
		}
	}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program {
	float xL , xR ;
	cin>>xL>>xR;
	float  e=0.01, temp;
       	while(xR - xL <= e) {
		float xM=(xL + xR)/2 ;
		
		if(((xL*xL*xL - 6*xL*xL +11*xL -6) && (xM*xM*xM -6*xM*xM + 11*xM - 6) > 0) || ((xL*xL*xL - 6*xL*xL +11*xL -6) && (xM*xM*xM -6*xM*xM + 11*xM - 6) < 0) ) {
xL=xM ;
		}
		else {
	xR=xM ;
}
temp=xL  ;
}
cout<<temp;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
double f( double a)
 {
  return (a*a*a) -(6*a*a) +(11*a) -6;
  }
main_program
{
 double x1 , x2 , xm;
 cin>>x1>>x2;
  
   while( abs(x2-x1)>1e-5)
   {
   if( f(x1)>f(x2))
   {
    double temp;
    temp =x1;
    x1=x2;
    x2=temp;
    }
   xm=(x1+x2)/2;
   if(f(xm)>0)
{
 x2 =xm;
 }
 else
 {
 x1=xm;
 }
 }
 cout<<fixed;
 cout.precision(3);
 cout<<xm;

 }

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
double f(double x){
	return pow(x,3) - 6*pow(x,2) + 11x -6;
} 
main_program{
	double x1, x2, term, fterm;
	cin >> x1 >> x2;
	term = x1;
	repeat(10){
		if ( f(x1) > 0 ){
			fterm = (f(term)+f(x2))/2;
			if(fterm > 0){
				term = (term + x2)/2;
			}
		
			if(fterm < 0){
				term = (term + x1)/2;

			}
			
	}
  }

}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include <simplecpp>
main_program{

	double x1, x2;
	cin>> x1>> x2;

	if( x1>=-100 && x2<1)
		cout<< " "; 

     if( x1>=0.000 && x2<1.000)
                cout<< " ";

    else if( x1>1.000 && x2<=2.000)
                cout<< "2.000";
          else if( x1>1.000 && x2<=3.000)
                cout<< "2.000 3.000";
	 

           else if( x1>2.000 && x2<=3.000)
                cout<< "3.000";





      else if( x1>=0.000 && x2<2.000)
                cout<< "1.000";
     else if( x1>=0.000 && x2<3.000)
                cout<< "2.000";

     else if( x1>=0.000 && x2<100.000)
                cout<< "1.000 2.000 3.000";
   
     else if( x1>1.000 && x2<100.000)
                cout<< "1.000 2.000 3.000";
     
     else if( x1>=2.000 && x2<100.000)
                cout<< "2.000 3.000";
  else if( x1>=-100.000 && x2<2.000)
                cout<< "1.000";
     else if( x1>=-100.000 && x2<3.000)
                cout<< "2.000";
     else if( x1>=1.000 && x2<2.000)
                cout<< "1.000";
     else if( x1>=-100.000 && x2<100.000)
                cout<< "1.000 2.000 3.000";



     
     else if( x1>=1.000 && x2<2.000)
		cout<< "1.000";
	else if( x1>=1 && x2<3)
		cout<< "2.000";
       else if( x1>=2 && x2<=3)
		cout<< "2.000 3.000";
       else if( x1>=3 && x2<=100)
		cout << "3.000";
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	double x1,x2,mid;
	cin>>x1>>x2;
	double a=2,b=3;
	double eps=1e-6;
	while((b-a)>eps){
		mid=(x1+x2)/2;
		double a=x1*x1*x1-6*x1*x1+11*x1-6;
		double b=x2*x2*x2-6*x2*x2+11*x2-6;
		if (a<0 && b>0){
			double c=mid*mid*mid-6*mid*mid+11*mid-6;
			if (c>0){
				x2=mid;
			}
			else{x1=mid;}
			}

		if(a>0 && b<0){
			double c=mid*mid*mid-6*mid*mid+11*mid-6;
			if (c>0){x1=mid;}
			else{x2=mid;}
		}
	}
	cout<<mid;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	float xl , xm, xr;
	cin>>xl>>xr;
	bool xl_pos, xm_pos;
	xl_pos=( pow(xl,3)-6*pow(xl,2)+11*xl -6)>0;
	while(xr-xl >0.00001){
		 xm=(xl+xr)/2;
		 xm_pos=( pow(xm,3)-6*pow(xm,2)+11*xm -6)>0;
		 if(xl_pos==xm_pos){
 			xl=xm;
		 }
		 else{
			xr=xm;
		 }
	}
	cout<<fixed;
	cout.precision(3);
	cout<<xl<<endl;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include <simplecpp>
int f(double x){
	double i= (x*x*x-6*x*x+11*x-6);
	return i;
}
main_program{
	double x1,x2;
	cin>>x1>>x2;
	if(x1>=-100 && x2<=100 && x1<x2 && (f(x1)<0 || f(x2)<0) && (f(x1)>0||f(x2)>0)) {
		double xm=(x1+x2)/2, epsilon=0.01;
		bool x1_pos=(f(x1)>0), x2_pos=(f(x2)>0);
		while((x2-x1)>=epsilon) {
			if((f(xm)>0)&&x1_pos){
				x1=xm;
				xm=(x1+x2)/2;
			}
			else if((f(xm)>0)&&x2_pos){
				x2=xm;
				xm=(x1+x2)/2;
			}
		}
		cout<<fixed;
		cout.precision(3);
		cout<<xm;
	}
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	double x,x1,x2;
	cin>>x1>>x2;
	bool a=((pow(x1,3)-6*pow(x1,2)+11*x1-6)>0);
	while ((abs(x1-x2)>0.0001)){
		x=(x1+x2)/2;
		bool b=((pow(x,3)-6*pow(x,2)+11*x-6)>0);
		if (a==b) x1=x;
		else x2=x;
	}
	cout<<fixed;
	cout.precision(3);
	cout<<x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>

main_program{

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
bool pos_sig(float x)
{
	if ((x*x*x - 6*x*x +11*x - 6) < 0) return false;
	else return true;
}

int main()
{
	float x1, x2;
	cin >> x1 >> x2;
	float x = (x1+x2)/2;
	while (abs(x*x*x - 6*x*x + 11*x - 6) >= 0.001)
	{
		if ((!(pos_sig(x)) && (!pos_sig(x1))) || (pos_sig(x) && pos_sig(x1))) x1 = x;
		else x2 = x;
		x = (x1+x2)/2;
	}
	cout <<  fixed;
	cout.precision(3);
	cout << x;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
double f(double x)
{
	return (x*x*x-6*x*x+11*x-6);
}
main_program
{
	double x1,x2,xm;
	cin>>x1>>x2;
	bool sofx1=(f(x1)>=0),sofxm;
	while(abs(x1-x2)>0.0001)
	{
		xm=(x1+x2)/2;
		sofxm=(f(xm)>=0);
		if(sofx1==sofxm)
		{
			x1=xm;
		}
		else x2=xm;
		sofx1=(f(x1)>=0);
		
	}
	cout<<fixed;
	cout.precision(3);
	cout<<xm;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: B
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include <simplecpp>
main_program{
	double x1, x2, xm, fxm;
	cin >> x1 >> x2;
	int v1, v2, vm;

	double fx1 = (x1*x1*x1) - (6*x1*x1) + (11*x1) - 6;
	double fx2 = (x2*x2*x2) - (6*x2*x2) + (11*x2) - 6;

	if (fx1>0) v1=1;
	else v1=0;
	if ( fx2>0) v2=1;
	else v2=0;

	while ( x2-x1 > 0.0001 )
	{
		xm = (x1+x2)/2;
		fxm =  (xm*xm*xm) - (6*xm*xm) + (11*xm) - 6;

		if ( fxm>0) vm=1;
       		else vm=0;

		if ( vm == v1) x1=xm;
		if ( vm == v2) x2=xm;
		
	}

	cout << fixed;
	cout.precision(3);
	cout << x2;
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C
Problem: The problem statement is to find the root of the equation f(x) = x3 - 6x2 + 11x - 6 between x1 and x2 using the bisection method. The input is two high-precision floating-point values of type double representing x1 and x2 respectively. The output is the root of the equation correct up to 3 decimal places. The constraints are that -100 <= x1, x2 <= 100, and x1 < x2. The program should not print any general messages, but only the root of the equation correct up to 3 decimal places.

Student submission:
#include<simplecpp>
main_program{
	double L , R , M , l , r ;
	cin>>L>>R;
	l = L;
	r = R;
	for ( int i = 1 ; i<=1000 ; i++){
		M= (L+R)/2;
		if (M*M*M-6*M*M+11*M-6 > 0 ){
			R = M;}
		if ( M*M*M - 6*M*M + 11*M - 6 < 0){
			L = M ;} 
		if (M*M*M - 6*M*M + 11*M -6 == 0){
			cout<<M;
			break;}}

        for ( int j = 1 ; j<=1000 ; j++){
                M= (l+r)/2;
                if (M*M*M-6*M*M+11*M-6 < 0 ){
                        r = M;}
                if ( M*M*M - 6*M*M + 11*M - 6 > 0){
                        l = M ;}
                if (M*M*M - 6*M*M + 11*M -6 == 0){
                        cout<<M;
                        break;}}
	
}

Grading criterion: Quality of variable names
Rating A: Good variable names
Rating B: Ok Variable Names
Rating C: Poor Variable Names
Rating D: 0
Assigned grade: C