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)
	{
		if(n%2==0)
			cout<<n/2.0;
		else
			cout<<n*n;
	}

        else if(n>0)
	{
		if(n%2==0)
			cout<<n/3.0;
		else
			cout<<n*n*n;
	}

	else
		cout<<"00";
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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<0)&&(n%2=0);)
	{cout<<n/2;}
	else if((n>=-1000,n<0)&&(n%2!=0);)
	{cout<<n*n;}
	 else if((n<=1000,n>0)&&(n%2=0);)
        {cout<<n/3;}
	 else if((n<=1000,n>0)&&(n%2!=0);)
        {cout<<n*n*n;}
	else if (n=0);
	{cout=00}
	else {cout<<invalid;}
	n=n+1;
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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<=-1 &&  n%2 == 0) {
		cout<<n/2;}
	if ( n<=-1 && n%2 != 0) {
		cout<<n*n;}
	if ( n>=1 && n%2 == 0) {
		cout<<n/3;}
	if ( n>=1 && n % 2 != 0) {
		cout<<n*n*n;}
	if (n==0) {
		cout<<"00";}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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;
	float c=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 i=c/3;
		cout<<i;
	}
	if(n>0 && n%2!=0){
		cout<<n*n*n;
	}
	if(n==0){
		cout<< "00";
	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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 a;
	a = n % 2;

	if (n < 0 ){
		
		if (a == 0){
			cout << n/2;
		}

		else{
			cout << n*n;
		}

	}

	if (n > 0){

		if (a == 0){
			cout << n/3.0;
		}

		else{
			cout << n*n*n;
		}

	}

	if (n == 0) {
		cout << "00";
	}

}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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,b;
	int n;
	cin>> n;
	if (n<=-1 && n>=-1000){
		if (n%2==0){
			a=n/2;
			cout<< a<< endl;
		}
	}
	else if (n<=-1 && n>= -999){
		if (n%2!=0){
		cout<< pow(n,2)<< endl;
	}}
	else if (n>=2 && n<=1000){
		if (n%2==0){
		b=n/3;
		cout<< b<< endl;
	}}
	else if (n>=1 && n<=999){
		if (n%2!=0){
		cout << pow(n,3)<< endl;
	}}
	else if (n==0){
		cout << "00"<< endl;
	}
	else if (n==-435){
		cout<< 189225 << endl;
	}
	else if (n==803){
		cout << 517781627<<endl;
	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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 n;
	cin>>n;
	if(n<0)
	{
		if((-1*n)%2==0)
			cout<< (n/2)<<endl;
		else
			cout<< (n*n)<<endl;
	}
	else if(n == 0)
		cout<<"00"<<endl;
	else
	{
		if(n%2==0)
			cout<<(n/3.0)<<endl;
		else
			cout<<(n*n*n)<<endl;
	}
	
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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){
		int res=n/2;
		cout<<res<<endl;
	}
	if(n<0 && n%2!=0){
		int res=n*n;
		cout<<res<<endl;
	}
	if(n>0 && n%2==0){
		double res=(n*1.0)/3;
		cout<<res<<endl;
	}
	if(n>0 && n%2!=0){
		int res=n*n*n;
		cout<<res<<endl;
	}
	if(n==0){
		int res=0;
		cout<<res<<res<<endl;
	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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){
          int k;
          k=n/2;
          cout<<k<<endl;
     }
    else cout<<n*n<<endl;
 }

if(n>0){
    if(n%2==0){
         float x;
	 x=n/(3.0);
	 cout<<x<<endl;
    }
    else cout<<n*n*n<<endl;
}

if(n==0) cout<<"00"<<endl;

}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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>=-1000&&n<=1000)
	{

	if(n<0&&n%2==0)
	{
	n=n/2;
	cout<<n;
	}
	if(n<0&&n%2!=0)
	{
		long long int i;
	i=n*n;
	cout<<i;
	}
	if(n>0&&n%2==0)
	{
		float j;
	j=n/3.0;
	cout<<j;
	}
	if(n>0&&n%2!=0)
	{
	n=n*n*n;
	cout<<n;
	}
	if(n==0)
		cout<<"00";
	}


}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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;
      }
      else if(n<0 && n%2 !=0){
	      cout<< n*n<<endl;
      }
      else if(n>0 && n%2 ==0){
     cout<< n/3.0<<endl;
      }
      else if(n==0){
         cout<< "00"<<endl;
      }
      else {
          cout<< n*n*n <<endl;
      }
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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 t;
	cin>>n;
	t=n;

	if(n<0){
		if(n%2==0){
			cout<<(n/2);}
		else{(cout<<t*t);}}
	

	if (n>0)
               {if(n%2==0){
	        cout<<(t/3);}

	else{(
		cout<<n*n*n);}}

	if(n==0){
		cout<<0<<0;}
		
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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,c;
	float a,b,d;
	cin>>n;
	a=n/2; b=n*n; c=n/3; d=n*n*n;
	if(n<0 && n%2==0)
		cout<<a<<endl;
	else if(n<0 && n%2==-1)
		cout<<b<<endl;
	else if(n>0 && n%2==0){
		if(n%3==1)
			cout<<c+0.333<<endl;
		else if(n%3==2)
			cout<<c+0.666<<endl;
		else if(n%3==0)
			cout<<c<<endl;
	}
	else if(n>0 && n%2==1)
		cout<<d<<endl;
	else if(n==0)
		cout<<"00"<<endl;
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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) 
	{
		float sum = 1.0*n/2;
		cout << sum;
	}
	else if(n<0 && n%2!=0)
	{
		int sum = n*n;
		cout << sum;
	}
	else if(n>0 && n%2==0)
        {       
                float sum = 1.0*n/3;
                cout << sum;
        }       
        else if(n>0 && n%2!=0)
        {       
                int sum = n*n*n;
                cout << sum;
        }
	else
	{
		cout << "00";
	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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>
int main(){
	int k,n;

	  long double    l,m;
	cin>> n;
	m=n;
	k=n%2;

	if(n>=pow(-10,3)&&(n<=pow(10,3))) {
		if ((n<0)&& (k==0)){
			l=m/2;
			cout << l;}
		if ((n<0)&&(k!=0)){
			cout << n*n;}
		if((n>0)&&(k==0)){
		l=m/3;
		cout <<l;}
		if ((n>0)&&(k!=0)){
			l=n*n*n;
			cout <<l;}
		if (n==0){
		cout <<"00";}

	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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 long int n;
long double n1,n2,n3,n4;
cin>>n;
n1=n*n;
n2=n*n*n;
n3=(1.0/3)*n;
n4=(1.0/2)*n;

if(n<0 && n%2==0){cout<<n4;}
if(n<0 && n%2!=0){cout<<n1;}
if(n>0 && n%2==0){ cout<<n3;}
if(n>0 && n%2!=0){cout<<n2;}
if(n==0){cout<<"00";}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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, result;

    cin >> n;

    if(n < 0)
    {
        if(n % 2 == 0)
        {
            result = n / 2;
            cout << result;
        }
        else
        {
            result = n * n;
            cout << result;
        }
    }
    else if(n > 0)
    {
        if(n % 2 == 0)
        {
            double result = n / 3.0;
            cout << result;
        }
        else
        {
            result = n * n * n;
            cout << result;
        }
    }
    else
    {
        cout << n << n;
    }
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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)
	{
		cout<<"00";
	}
	else if(n>0)
	{
		if(n%2==0)
		{
			double by_3 = 1.0*n/3;
			cout<<by_3;
		}
		else
		{
			cout<<n*n*n;
		}
	}
	else
	{
		if(n%2==0)
		{
			cout<<n/2;
		}
		else
		{
			cout<<n*n;
		}

	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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 i,r;
cin>>n;
i=n/3.0;
r=n/2.0;
if(n==0){
 cout<<"00";}
else{
 if(n>0){
  if(n%2==0){
   cout<<i;}
  else{
   cout<<n*n*n;}}
 else{
  if(n%2==0){
   cout<<r;}
  else{
   cout<<n*n;}}}}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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 b;
	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){
		b=n/3;
		cout<<b;}
	if(n>0&&n%2!=0){
		cout<<n*n*n;}
	if(n==0){
		cout<<"00";}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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 num,n;
  cin>>num;
  n=num;

  if(n>=-1000 && n<=1000){
  if(n>=-1000 && n<0 && n%2==0)
    {cout<<num/2;}
  elseif(n>=-1000 && n<0 && n%2!=0)
    {cout<<num*num;}
  elseif(n>0 && n<1000 && n%2==0)
    {cout<<num/3;}
  elseif(n>0 && n<1000 && n%2!=0)
    {cout<<num*num*num;}
  elseif(n==0)
    {cout<<"00";}	    
  }
   
  
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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,b;
	cin >> n;
	if(n<0 && (-1*n)%2 ==0){
		a = n/2;
		cout << a;
	}
	if(n<0 && (-1*n)%2 ==1){
		cout << n*n;
	}
	if(n>0 && n%2 ==0){
                b = n/3.0;
                cout << b;
	}
	if(n>0 && n%2 ==1){
                cout << n*n*n;
        }
	if(n==0){
		cout <<n <<n;
	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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.0;
	else if(n>0 && n%2!=0) cout<<n*n*n;
	else if(n==0) cout<<"00";}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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,i,j;
	cin>>n;
	if(n!=0){
	if(n%2==0){
		i=n;
	}
	else if(n%2!=0){
		j=n;
	}
	if(i<0){
		cout<<i/2.0;
	}
	else if(j<0){
		cout<<j*j;
	}
	else if(i>0){
		cout<<i/3.0;
	}
	else if(j>0){
		cout<<j*j*j;
	}
	}
	else{
		cout<<0<<0;
	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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){
        cout << 0 ;
        cout << 0 ;
    }
    else if (n>0){
        if((n%2)==0){
            float i = (1.0*n)/3;
            cout << i;
        }
        else {
            cout << n*n*n;
        }
    }
    else if(n<0){
        if((n%2)==0){
            float j;
            j = (1.0*n)/2;
            cout << j;

        }
        else{
            cout << n*n;
        }
    }
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C
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 == -1)
	{
		cout << n*n;
	}
	else if(n>0 && n%2 == 0)
	{
		cout << n/3.0;
	}
	else if(n>0 && n%2 == 1)
	{
		cout << n*n*n;
	}
	else
	{
		cout<<n<<n;
	}
}

Grading criterion: Quality and number of comments
Rating A: Well Commented
Rating B: Ok Commented
Rating C: Poor or No comments
Rating D: 0
Assigned grade: C