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{
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	if((1<=a && a<=100) &&(1<=b && b<=100) &&(1<=c && c<=100) &&(1<=d && d<=100)){
	float z;
	z=((a*d+b*c)*1.0/(b*d));
	cout<<z;

}

}

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;
double e;
if((a>=1 && a<=100) && (b>=1 && b<=100) && (c>=1 && c<=100) && (d>=1 && d<=100))
e=((1.0*(a*d+b*c))/(1.0*(b*d)));
else
cout<<"invalid input";
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 X, a, b, c, d;
	cin>>a>>b>>c>>d;
	X=(a*d+c*b)/b*d;
	cout<<X<<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{
float a,b,c,d;
cin>>a>>b>>c>>d;
cout<<((a*d)+(b*c))/(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 ;

	double ans = (a*d*1.0 + c*b*1.0)/(b*d) ;

	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;
 float ans = 0;
	cin >> a >>  b >> c>>d;
ans = a/b+c/d;
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;
	double 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 <iostream>
using namespace std;
int main(){
	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>
int main(){
	double a;double b;double c; double d;
	cin>>a>>b>>c>>d;
	
	
	cout<<(a*d + b*c)/(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 ;
	cout << float  ((a*d)+(b*c))/(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;
	cout<<((a*d + b*c)*(1.0))/(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 output;
	cin>>a>>b>>c>>d;
	output=(1.0*((a*d)+(b*c)))/(b*d);
	cout<<output;
}

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 + 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{
	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)){
		float add=((a*d)+(b*c))/(b*d);
		cout<<add;
	}
}

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;
	double q1,q2;
	cin>>a>>b>>c>>d;
	double p=a,q=b,r=c,s=d;
	q1=p/q;
	q2=r/s;
	cout<<q1+q2;
}

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 sum;
	sum=(a*1.0/b)+(c*1.0/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{
	float s,a,b,c,d;
	cin>>a>>b>>c>>d;
	s=(a/b)+(c/d);
	cout<<s<<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{
	float a,b,c,d,f1,f2,s;
	cin>>a>>b>>c>>d;
	while(a>=1&&a<=100&&b>=1&&b<=100&&c>=1&&c<=100&&d>=1&&d<=100){
	f1=a/b;f2=c/d;
        s=f1+f2;
	cout<<s;
	break;}}

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 = 1.00000 ;
cin >> a  >> b >> c >> d ;

float ans= 1.00000 ;
float p,q = 1.00000 ;

p= a/b ;
q= c/d ;

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

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>
using namespace std ;

main_program
{
	float a , b , c , d ;
	cin >> a >> b >> c >> d ;
	cout << ( a*d + b*c ) / (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;
	     int b;
	     int c;
	     int d;
	     cin>>a>>b>>c>>d;
	     double s;
           if((a>=1 && a<=100) &&( b>=1 && b<=100) && (c>=1 && c<=100) && (d>=1 && d<=100)){
		   s= ((1.0*a)/b)+((1.0*c)/d);
		   cout<<s<<endl;
	   }
	   else cout<<"invalid input"<<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{
	float a;
	float b;
	 float c;
        float d;

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

	cout<< ((a/b) + (c/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{
float a,b,c,d,e,g,f;
cin>>a>>b>>c>>d;
e=a*d; f=b*c; g=b*d;
cout<<(e+f)/g;
}

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 r=(a*d+b*c)/(b*d);
	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