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;
	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: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
	sum=(a*1.0/b)+(c*1.0/d);
	cout<<sum;}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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 s,a,b,c,d;
	cin>>a>>b>>c>>d;
	s=(a/b)+(c/d);
	cout<<s<<endl;
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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,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: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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 = 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: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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>
using namespace std ;

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

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
	     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: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
	float b;
	 float c;
        float d;

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

	cout<< ((a/b) + (c/d))<< endl;
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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,e,g,f;
cin>>a>>b>>c>>d;
e=a*d; f=b*c; g=b*d;
cout<<(e+f)/g;
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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 r=(a*d+b*c)/(b*d);
	cout<<r;
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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>
using namespace std;
main_program {

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

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
 cout<<(a/b) + (c/d);
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
	float output;
	cin >> a >> b >> c >> d;
	output = (a*d + b*c)/(b*d);
	cout << output << endl;
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
cin>>a;

float b;
cin>>b;
float c;
cin>>c;

float d;
cin>>d;



double int1;
double int2;
double intf;


int1= a*d+b*c;
int2=b*d;

intf=int1/int2;




cout<<intf;



}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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 term = (a/b) + (c/d);
	cout << term<< "\n";
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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:
//Gokula
#include <simplecpp>
main_program{
	int 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 result = (1.0 * ((a*d) + (b*c))) / (b*d);
		cout<<result;
	}
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
cin>>a;
float b;
cin>>b;
float c;
cin>>c;
float d;
cin>>d;
if(1<=a && a<=100 && 1<=b && b<=100 && 1<=c && c<=100 && 1<=d && d<=100){
cout<<((a*d)+(b*c))/(b*d);
    }
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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>
int main(){
  float a,b,c,d;
  cin>>a>>b>>c>>d;
   float f, g;
  f=a/b;
  g=c/d;

  float w;
  w=f+g;  
  w=((a*d)+(b*c))/(b*d);
   cout<<w;
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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 e=a*d+b*c;
	float f=b*d;
	float g=e/f;
	cout<<g;
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
	cout << (((a*d)*1.0 + (b*c)*1.0)/((b*d)*1.0));
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
		cin>>b;
	cin>>c;
       cin>>d;
      float x,y;
	if((1<=a&&a<=100) && (1<=b&&b<=100)&&(1<=c&&c<=100)&&(1<=d&&d<=100)){
         
	 x=(a*d+b*c);y=b*d;}
	 cout<<x/y<<endl;
	
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
	if (1<=a && 1<=b && 1<=c && 1<=d && a<=100 && b<=100 && c<=100 && d<=100)	{	
		float out=(a*d+b*c)/(b*d*1.0);
		cout<<out;
	}
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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=0,b=0,c=0,d=0;
	cin>>a>>b>>c>>d;
	float sum1=0.,sum2=0.0,sum=0.0;
	sum1=a*d+b*c;
	sum2=b*d;
	sum=sum1/sum2;
	cout<<sum;
}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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;
	 float f;
	 cin >> a >> b >> c >> d;
	  f=float((a*d+b*c)/(b*d));	 
	 cout << f;
	 
 }

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
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,e;
	

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

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











}

Grading criterion: E.g. Use of functions beyond what was instructed or any other code quality
Rating A: Modularity, Extra Functions Defined
Rating B: No Extra Things
Rating C: 0
Rating D: 0
Assigned grade: B