CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
int n;
cin >> n;


if(n<0 && (n*(-1))%2==0) cout << n / 2;
if(n<0 && (n*(-1))%2!=0) cout << n * n;
if(n>0 && n%2==0) cout << n / 3.0;
if(n>0 && n%2!=0) cout << n*n*n;
if (n==0) cout << "00";
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
float a;
int n;
cin>>n;
if((n<0) && ((n%2)==0)){
cout<<(n/2)<<endl;}
else if((n<0) && ((n%2) !=0)){
cout<<(n*n)<<endl;}
else if((n>0) && ((n%2)==0)){
a=n;
cout<<a/3<<endl;}
else if((n>0) && ((n%2) !=0)){
cout<<(n*n*n)<<endl;}
else if(n==0){
cout<<"0"<<"0"<<endl;}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include <simplecpp>

main_program{
	int n;
	cout << "n: ";
        cin >> n;
	if(n<0 && n%2==0) cout << n/2 << endl;
	if(n<0 && n%2==1) cout << (n*n) << endl;
	if(n>0 && n%2==0) cout << (n/3) << endl;
	if(n>0 && n%2==1) cout << (n*n*n) << endl;
        if(n==0) cout << "00" << endl;

}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
int n;
long double ans;
float a;
cin>>n;
a=n;
	if (n<0){
		if(n%2==0){
		ans=n/2;
		}
		else{
		ans=n*n;
		}
		cout<<ans;
	}
	else{
		if(n%2==0){
		ans=(n*1.0)/3;
		}
		else{
		ans=a*a*a;
		}
		cout<<ans;
	}
	if(n==0) {cout<<"0";}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>

main_program{
	int n;
	cin>>n;
	if(n<0 && n%2==0)
	{
		cout<<n/2;
	}
	else if(n<0 && n%2!=0)
	{
		cout<<n*n;
	}
	else if(n>0 && n%2==0){
		cout<<(n*1.0)/3;
	}
	else if(n>0 && n%2!=0)
	{
		cout<<n*n*n;
	}
	else if(n==0)
	{
		cout<<"00";
	}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include <simplecpp>
main_program{
	long int n ;
	int res1 ;
	double res2;
	cin >> n ;
	if ( n<0 && n%2==0){
		res2  =float( n)/2;
		cout << res2;
	}
	else if ( n<0 && n%2!=0){
		res1 = n*n;
		cout << res1;
	}
	else if ( n>0 && n%2==0){
		res2  = float( n)/3;
		cout << res2;
	}
	else if ( n>0 && n%2!=0){
		res1 = n*n*n;
		cout << res1;
	}
	else if ( n==0){
		cout << "00";
	}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n,p;

	cin>>n;
	if(n>=-1000 && n<=1000){
	if(n<0){
		p=-1*n;
		if(p%2==0){double f;
			f=n/2;
			cout<<f;}
		if(p%2!=0){
			cout<<n*n;}
	}
	if(n>0){
		if(n%2==0){double k;
			k=n/3;
			cout<<k;}
		if(n%2!=0){
			cout<<n*n*n;}
	}
	if(n==0){
		cout<<00;
	}}}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin>>n;
	if(n<0){
		if(n%2==0){ cout<<n/2;}
		else{ cout<<n*n;}
	}
	else if(n>0){
		if(n%2==0){ cout<<n/3.000;}
		else{ cout<<n*n*n;}
	}
	else{
		cout<<"00";
	}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin>>n;
	if ( n<0 && n%2==0){
		cout<<n/2<<endl;
	}
	if ( n<0 && n%2!=0){
                cout<<n*n<<endl;
        }
	if ( n>0 && n%2==0){
		double m = n;
                cout<<m/3<<endl;
        }
	if ( n>0 && n%2!=0){
                cout<<n*n*n<<endl;
        }
	if ( n==0){
                cout<<"00"<<endl;
        }
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin >> n;
	if (n<0 && n%2==0){
		cout << n/2;
	}
	else if (n<0 && n%2!=0){
		cout << n*n;
	}
	else if (n>0 && n%2==0){
		cout << n*1.0/3;
	}
	else if (n>0 && n%2 != 0){
		cout << n*n*n;
	}
	else if (n==0){
		cout << "00";
	}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n, a;
	cin>>n;
	a=n%2;
	if(n<0){
		if(a==0) cout<<n/2;
		else cout<<n*n;
	}
	else if (n>0){
		if(a==0) cout<<n/3.0;
		else cout<<n*n*n;
	}
	else cout<<"00";
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program {int n;
	cin >> n;
	if(n<0 && n%2==0){cout << n/2;}
	if(n<0 && n%2!=0){cout << n*n;}
	if(n>0 && n%2==0){float s = n/3.0;
		cout << s;}
	if(n>0 && n%2!=0){cout << n*n*n;}
	if(n==0){cout << "00";}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	float a;
	cin>>n;
	if ((n<0)&&(n%2==0)){
		cout<<(n/2);
	}
	if ((n<0)&&!(n%2==0)){
		cout<<(n*n);}
	if ((n>0)&&(n%2==0)){
		a=(n*(1.0))/3;
		cout<<a;}
	if ((n>0)&&!(n%2==0)){
		cout<<(n*n*n);}
	if (n==0){
		cout<<"00";}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include <simplecpp>
main_program 
{
	int n;
	cin>>n;
	int result;
	float deciresult;
	
	if(n<0)
	{
		if(n%2==0)
		{
			result=n/2;
			cout<<result;
		}
		else
		{
			result=pow(n,2);
			cout<<result;
		}
	}
	else if(n>0)
	{
		if(n%2==0)
		{
			deciresult=n*1.0/3;
			cout<<deciresult;
		}
		else
		{
			result=pow(n,3);
			cout<<result;
		}
	}
	else
	{
		cout<<"00";
	}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include <simplecpp>
main_program {

int n, u;
cin>>n;
float t;
t=n;
u=-n;
if(n>=-1000 && n<=1000){
if(n<0 && n%2==0){cout<<t/2;}
if(n<0 && u%2==1){cout<<n*n;}
if(n>0 && n%2==0){cout<<t/3;}
if(n>0 && n%2==1){cout<<n*n*n;}
if(n==0){cout<<"00";}

}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin>>n;
	
	if(n<0 && (-n)%2==0)
		cout<<n/2;
	else if(n<0 && (-n)%2!=0)
		cout<<n*n;
       else	if(n>0 && n%2==0)
		cout<<n/3;
       else if(n>0 && n%2!=0)
               cout<< n*n*n;
	else if (n==0)
	 cout<<"00";
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
  long int n;
  cin>>n;

  if(n<0 && n%2==0){
    cout<<n/2;
  }
  else if(n<0 && n%2!=0){
    cout<<n*n;
  }
  else if(n>0 && n%2==0){
    float a=n/3.0;
    cout<<a;
  }
  else if(n>0 && n%2!=0){
    cout<<n*n*n;
  }
  else if(n==0){
    cout<<"00";
  }
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program
while(true){
	if(n=-1000 && =1000)
}
elseif (n<0 & n2|=0) {
	cout << 2n*n<< endl;
}
else if (n>0 && n*2 =0) {
	cout << n*1 0/3 endl;
}
else if (n=0) {
cout <<00<< endl;
}
forl|n =1000(|n>|1000)break;
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: B
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	long result;
	cin >> n;
	if(n<0 && (n%2==0)){
		result=n/2;
	cout << result <<endl;
	}
	else if(n<0 && (n%2!=0)){
		result=n*n;
	cout << result <<endl;		
	}
	else if(n>0 && (n%2==0)){
		result = 1.0*n/3.0;
	cout << result << endl;
	}
	else if(n>0 && (n%2!=0)){
		result = n*n*n;
	cout << result;
	}
	else if (n==0){
		cout << "00" <<endl;
	}
	
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{

int n;

cin >> n;

if(n<0 && n%2==0){cout << n/2;}
if(n<0 && n%2!=0){cout << n*n;}
if(n == 0){cout << "00";}
if(n>0 && n%2==0){cout << n/3.0;}
if(n>0 && n%2==1){cout << n*n*n;}


}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program
{
	int n;
	cin>>n;
	if(n>=-1000&&n<=1000)
	{
	if(n<0&&(n*-1)%2==0)
	{
		cout<<(n/2);
	}
	if(n<0&&(n*-1)%2==1)
	{
		cout<<(n*n);
	}
	if(n>0&&n%2==0)
	{float p=(n*1.0)/3;
		cout<<p;
	}
	if(n>0&&n%2==1)
	{
		cout<<(n*n*n);
	}
	if(n==0)
	{
		cout<<0<<0;
	}
}}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include <simplecpp>
main_program{
int n;
long long int result;
cin>>n;
if(n<0 && n%2==0){
	 result=n/2;
	cout<<result;}
else if(n<0 && n%2!=0){
	 result=n*n;
	cout<<result;
}
else if(n>0 && n%2==0){
	float result1=n*1.0/3;
	cout<<result1;
}
else if(n>0 && n%2!=0){
	result=n*n*n;
	cout<<result;
}
else
cout<<"00";
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin>>n;
	if(n<0 && (n%2)==0){
		cout<<n/2.0;}
	if(n<0 && (n%2)!=0){
		cout<<n*n;}
	if(n>0 && (n%2)==0){
		cout<<n/3.0;}
	if(n>0 && (n%2)!=0){
		cout<<n*n*n;}
	if(n==0){
		cout<<"00";}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	float m;
	int n;
	cin >> m;
	n = m;
	if(n<0 && n%2==0) cout << n/2 << endl;
	if (n<0 && n%2!=0) cout <<n* n<<endl;
	if(n>0) {
		if (n%2 ==0) cout << m/3 << endl;
		if(n%2!=0) cout << n*n*n << endl;
	}
	if (n==0) cout << "00" << endl;
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include <simplecpp>

main_program{

	int n;
	float ans;
	cin>>n;

	if ((n < 0) && (n%2) == 0) {
	
		cout<<n/2<<endl;
	
	} else if ((n < 0) && (n%2) != 0) {
	
		cout<<n*n<<endl;
	
	} else if ((n > 0) && (n&2) == 0) {
	
		ans = n/3.0;
		cout<<ans<<endl;
	
	} else if ((n > 0) && (n%2) == 1) {
	
		cout<<n*n*n<<endl;
	
	} else if ((n == 0)) {
	
		cout<<0<<0<<endl;
	
	}

}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program
{
	int a;
	cin>>a;
	if(a<0 && a%2=0) {
		cout<<a/2<<"\n";
	}
        else if(a<0 && a%2=1) {
		cout<<a*a<<"\n";
	}
	else if(a>0 && a%2=0) {
		cout<<a/3<<"\n";
	}
	else if(a>0 && a%2=1) {
		cout<<a*a*a<<"\n";
	}
	else { cout<<"00"<<"\n"; }
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin>>n;
	if((n>=-1000) &&(n<=1000)){
	if((n%2==0) && (n<0)){
		cout<<n/2;}
	else if((n%2!=0) &&(n<0)){
		cout<<n*n;
	}
	else if((n%2==0) &&(n>0)){
		cout<<n/3;
	}
	else if((n%2!=2) &&(n>0)){
		cout<<n*n*n;
	}
	else if(n==0){
		
		cout<<"00";
	}
}
}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a program that accepts a number n from the user and performs a specific operation as given belowIf n is negative and even, compute n/2 and print the resultIf n is negative and odd, print the square of nIf n is positive and even, compute n/3 and print the result.If n is positive and odd, print the cube of nIf n is zero, print the number 0 two times i.e print 00

Constraints (Assume) 10^3 <=n <=10^3

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin>>n;
	if(n<0){if(n%2==0){float  k=n/2;cout<<k;}else{float  k=n*n;cout<<k;}}
	else if(n>0){if(n%2==0){float k=n/3;;cout<<k;}else{float k=pow(n,3);cout<<k;}}
	
	else{cout<<"00";}}

Grading criterion: Negative Even
Rating A: Correctly Implemented
Rating B: Not Implemented Correctly
Rating C: 0
Rating D: 0
Assigned grade: A