CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a C++ program to accept four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program
{
	double a,b,c,d;
	cin>>a>>b>>c>>d;
	double ans;
	ans=(double)(((a*d)+(b*c))/(b*d));
	cout<<ans;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{

	float a,b,c,d,output;
	cin>>a>>b>>c>>d;
	output=((a*d)+(b*c))/(b*d);
	cout<<output;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>

main_program{
	float a,b,c,d;
	cin>>a>>b>>c>>d;
	float sum;
	sum=(a*d+b*c)/(b*d);
	cout<<sum;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

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

cout<<(a*d+b*c)/(b*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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{
int a,b,c,d;
cout<<"{(a*d)+(b*c)/(b*d)}";
cin>>a,b,c,d;
if (a>=1 || a<=100 || b>=1 || b<=100 || c>=1 || c<=100|| d>=1 || d<=100)
 
{ (b<a) {
cout<<"invalid"<<endl;
} 
(c<d)
cout<<"invalid"<<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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
float a,b,c,d,e,f,g;
main_program{

	cin>>a >>b >>c >>d ;
	e=a/b;
	f=c/d;
	g=e+f;

	cout<<g;





}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{
float a,b,c,d;
float k;
cin>>a>>b>>c>>d;
if(a>=1 && d<=100 && b!=0 && d!=0){
	
k=(a/b)+(c/d);

}
cout<<k;




}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include <simplecpp>

main_program{
float a, b, c, d;

cin >> a >> b >> c;
cin >> d;


cout << (a * d + b * c)/(b * 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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{
	float a;
	float b;
	float c;
	float d;
        float t;

	cin >> a;
	cin >> b;
	cin >> c;
	cin >> d;


	t= (a*d + b*c)/(b*d) ;
	cout<< t;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{
	float a,b,c,d;
	cin>>a>>b>>c>>d;
	//I have solved without making this into an equaton.
	//simply (a/b)+(c/d).
	cout<<(a/b)+(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: B
Problem: Write a C++ program to accept four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include <simplecpp>
main_program{
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	float sum=a*d+b*c;
	float div=b*d;
	cout<<sum/div;}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>

main_program{
	int a,b,c,d;
	cin >> a >> b >> c >> d;
	float exprn;
	float numerator = (a*d)+(b*c);
	float denominator = b*d;
	exprn = numerator/denominator;
	cout << exprn;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include <simplecpp>
main_program{
	float a,b,c,d;
	cin>>a>>b>>c>>d;
	cout<<(a*d+c*b)/(b*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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>

main_program
{

	float a,b,c,d, ans;


	cin>>a>>b>>c>>d;



	ans = (a/b) + (c/d) ;

	cout<<ans;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include <simplecpp>

main_program{
    int a, b, c, d;
    cin>>a>>b>>c>>d;
    double ans = 1.0*(a*d+b*c)/(b*d);
    cout<<ans;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{
	float a,b,c,d;
	cin>>a>>b>>c>>d;
	cout<< (a*d+b*c)/(b*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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

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

    output=(1.0)*((a*d)+(b*c))/(b*d);
    cout<< output;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>

main_program{

	int a, b, c, d;
	cin >> a >> b >> c >> d;

	cout << (1.0 * a * d + 1.0 * b * c) / (1.0 * b * d) <<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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>

main_program{
	float a,b,c,d;
	cin>>a>>b>>c>>d;
	float num=(a*d) + (b*c);
	float den=b*d;
	float sum=num/den;
	cout<<sum;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include <simplecpp>
main_program{
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	float p,q,r,s;
	p=a*d;
	q=b*c;
	p=p+q;
	r=b*d;
	s=p/r;
	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: C
Problem: Write a C++ program to accept four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{
float a,b,c,d;
cin>>a>>b>>c>>d;
float sum=(a*d + b*c)/(b*d);
cout<<sum;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include <simplecpp>

main_program{
	float a, b, c, d;
	cin >> a >> b >> c >> d;
	if (a >= 1 && a <= 100 && b >= 1 && b <= 100 && c >= 1 && c <= 100 && d >= 1 && d <= 100){
        cout << (a*d + b*c) / (b*d);
	}
	else {
        cout <<"invalid input" ;
	}
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{
	int a,b,c,d;
	float m,n,i;
	cin>>a>>b>>c>>d;

	  m=a*d;
	  n=b*c;
	  i=b*d;

	cout<< (m+n)/i;
}

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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

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

	q = (a/b)+(c/d);

	if((1<=a&&a<=100)&&b>=1&& b<=100 &&c>=1&&c<=100&&d>=1&&d<=100){
		cout<<q<<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 four numbers from the user a, b, c, and d and compute the addition of (a/b) with (c/d). The formula to compute the addition of two fractions is given below (a*d + b*c)/(c*d). Print the final value as output on the screen.

Note: Do not write any C++ statements for printing general messages. For example, the following should NOT be present in your program:cout << "Enter a number:", cout << "The computed answer is", etc. In addition, do not print unnecessary spaces unless specified in the program. You just have to print the result.

Student submission:
#include<simplecpp>
main_program{
	float  a,b,c,d;
		cin>>a>>b>>c>>d;
		if(1<=a || b || c || d<=100 ){
		float  x=a*d;
		float  y=b*c;
               float  z=b*d;
	       float  r=x+y;
	       float m =r/z;
	       cout<<m;
		}

	else cout<<" invalid";
}

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