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;
	float e = ((a*d)+(b*c))/(b*d);//e=a/b +c/d
	cout<<e;
	
	//else{
	//	cout<<"invalid input";}
}

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;
	double s, f;
	cin >> a >> b >> c >> d;
	s = a/b;
	f = c/d;
	cout << s+f;
}

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 e;
cin>>a>>b>>c>>d;
e=(((a*d)+(b*c))*1.0)/(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 output,a,b,c,d;
	cin>>a >>b >>c >>d ;
	output= ((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{
	int a,b,c,d;
	cin>>a;
	cin>>b;
	cin>>c;
	cin>>d;

	
	float sum;

	if(a>=1 && b>=1 && c>=1 && d>=1 && a<=100 && b<=100 && c<=100 && d<=100){
		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: 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 ans = (1.00*(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>
main_program{
	float a,b,c,d;
	float D;
	cin>>a>>b>>c>>d;
	D = (a*d+b*c)/(b*d);
	cout<<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);
}

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 x,y,z;
(1<=a && a<=100);
(1<=b && b<=100);
(1<=c && c<=100);
(1<=d && d<=100);



cin>>a >>b >>c >>d ;
x = a*d + b*c;
y = b*d;
z = x/y;
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;
	float s;
	cin >> a >> b >> c >> d;
	s = (1.0)*(a*d + b*c)/(b*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{
  double a,b,c,d;
  cin>>a>>b>>c>>d;
  double ans;
  ans=((a*d)+(b*c))/(b*d);
  cout<<ans<<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
{
double a,b,c,d;
cin >> a >> b >> c >> d;
double s = a/b;
double g = c/d;
cout << s+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;
		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{

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

	// Sum of fractions.
	cout << 1.0*a/b + 1.0*c/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{
	float a,b,c,d,e;
cin>>a>>b>>c>>d;
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=0,b=0,c=0,d=0;
	cin >> a>> b>>c>>d;
	cout <<( a/b)+(c/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: 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{
	
	float a,b,c,d;
	cin>>a>>b>>c>>d;
       float  sum=(a*d+b*c)/(b*d);
       cout<<sum<<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{
    double a,b,c,d; //I am not adding anythings about the constraints since it is given as an assumption
    cin>>a>>b>>c>>d;
    double 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;
	float 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>
main_program {
	float a,b,c,d,k ;
	cin>>a>>b>>c>>d;
		k= (a*d+b*c)/(b*d);
		cout<<k<<" ";}

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