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{
	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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 n;
	n=a*d+b*c;
	float q;
	q=b*d;
	cout << n/q;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 result;

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

result = (((1.0*a)*(1.0*d)) + ((1.0*b)*(1.0*c)))/((1.0*b)*(1.0*d));                       // 1.0 is multiplied to each number to convert it to a floating type number
cout<<result;


}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 s = (a/b) + (c/d);
	cout<< s;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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;
	int  b;
	int  c;
	int  d;

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

	cout<< (a*d + b*c +0.0)/(b*d)  ; /*added a 0.0 to convert entire numerator to floating point as question specified integer variables */


}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 p,q;
	p=a/b;
	q=c/d;
	cout<<p+q;

}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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<<float(a*d + b*c)/(b*d)<<endl;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 result;
	cin>>a>>b>>c>>d;
	result = (a*d+b*c)*1.0/(b*d);
	cout<<result;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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; int b; int c; int d;
	cin>>a>>b>>c>>d;
	float e=(1.0*a/b)+(1.0*c/d);
	cout<<e;}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 num= (a*d)+(b*c);
float denom=b*d;
cout<<(num/denom);




}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 x = a/b;
float y = c/d;
cout << x+y;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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{
	long double a, b, c, d;
	cin >> a >> b >> c >> d;
	long double ans = (a*d + b*c)/(b*d);
	cout << ans << "\n";
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 ans = (a*d + b*c)*1.0/(b*d)*1.0;

	cout << ans;

}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 x;
x=((a*d)+(b*c))/(b*d);
cout<<x;



}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 i;
	cin>>a>>b>>c>>d;
	if(a<=100&&b<=100&&c<=100&&d<=100&&a>=1&&b>=1&&c>=1&&d>=1)
	{ i=(a*d + b*c)/(b*d);
	  cout<<i;
	}

}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 result = (a*d + b*c)*1.0/(b*d);

	cout << result;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 tot;
	tot = (a*d + b*c)/(b*d);
	cout << tot;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 ; 

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

	float answer ; 

	float numerator = a*d + b * c ; 
	float denominator = b * d ; 

	answer = numerator / denominator ; 

	cout << answer ;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 e=((a*d)+(b*c))/(b*d);



cout<<e;}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
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 p = float(a)/b;
	float q = float(c)/d;
	float r = p + q;
	cout << r;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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 e = ((a*d)+(b*c))/(b*d); 

    cout<<e;
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A
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,sum;
	cin>>a>>b>>c>>d;
	if(a>=1	&&d<=100){
		sum=a/b +c/d;
		cout<<sum;
	
	
	}
}

Grading criterion: Correctness of Answer
Rating A: Final answer completely correct
Rating B: Individual Fractions have wrong datatype (int instead of float), or some other mistake
Rating C: Code completely wrong
Rating D: 0
Assigned grade: A