CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n,m=0;
cin>>n;
int i=0;
int k=0;
while(n/10 !=0){
	k=n%10;
	n=n/10;
	m= 10*m+k;
	i++;
		}
cout<<m*10+n;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <iostream>
using namespace std;

int main(){
	long long int n,m;
	cin>>n;
	while(n>0){
		int temp=n%10;
		n/=10;
		m+=temp;
		m*=10;
		
	}
	cout<<(m/10);
	return 0;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <simplecpp>

main_program{

long long int n,reverse=0,length, i=0,remainder;
cin>>n;

length=to_string(n).length();
while (i<length){
	if (n%10==0){
		n/=10;
	};
	i+=1;
};

i=0;
length=to_string(n).length();
while (i<length){
	reverse=reverse*10;
	remainder=n%10;
	reverse=remainder+reverse;
	n=n/10;
	i+=1;
};







cout<<reverse;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
	int n,rev=0;
	cin>>n;
	while(n>0){
		rev=rev*10+n%10;
		n=n/10;
	if(n%10==0){
		n=n/10;
		while(n>0){
		rev=rev*10+n%10;
		n=n/10;}
	}}
	cout<<rev;
		
			  
			  }

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <iostream>
using namespace std;
int main()
{
int n,r,m=0,x=1,p=10,q=1,i;
cin>>n;
while (n>=p)
{x=x+1;
p=p*10;}
for(i=1;i<=x;i++)
{
r=n/p;
m+=10*r*q;
q=q*10;
p=p/10;
n-=r*q;}
cout<<m;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
#include<cmath>
using namespace std;

int main(){
int n,a,x,m=0,y=1;
cin>>n;
while(n/y>=10) y=y*10;
a=y;
for(int i=0;i<log(a)/log(10)+1;i=i+1)
{x=(n/y)%10;
 m=m+x*pow(10,i);
 y=y/10;
}
cout<<m;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<simplecpp>
main_program{ 
int n,r;cin>>n;
	while(n>0){ 
	r=n%10;
    if(r==0){ n=n/10; continue;}
	else { 
	while(n>0){
		cout<<r;
		n=n/10;
		r=n%10;
	    }
	}
	}
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;

int main() {
  int n,a=0,n1;
    cin>>n;
	if(n>0){
		while(n!=0){
		 n1=n%10;
   		 n=n/10;
   		 a=a*10+n1;
   		 }
		 cout<<a;
		}

}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int N;
cin>>N;
int temp=N;
int sum=0;
int i;
int temp1=N;
for( i=1;temp/10!=0;i++)
{
temp=temp/10;}

for(int j=1;j<=i;j++){
int k=temp1%10;
sum=sum+(k*pow(10,i-j));
temp1=(temp1-k)/10;
}
cout<<sum;}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
int n,r,rev=0,a=n;
cin>>n;
while(n>0)
{
	r=n%10;

	rev=rev*10+r;
	n=n/10;}
cout<<rev;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
	int n,y,x,r;
	 cin>>n;
	x=1;
	y=0;
	 while(x!=0&&n>0){
		    	 r=n%10;
		     	x=n/10;
		     	y=y*10+r;
		     	n=x;
		    	}
           	cout<<y;
	}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main()
{	int n,d,p=0;
	cin>>n;
	for(int m=n;m>0 ; m/=10)
	{	int d=m%10;
		p=p*10+d;
	}
	cout<<p;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;

int main(){

int n;
cin>>n;
int m=0;
while(n){
m=10*m+n%10;
n=n/10;
}
cout<<m<<endl;
return 0;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
while(n>0){
if(n%10==0){n=n/10;}
if (n%10!=0){
cout<<(n%10);
n= (n-(n%10))/10;}
}
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <iostream>
#include <cmath>

using namespace std;

int main() {

	int n;

	cin >> n;

	int nrev = 0, nc = n;

	int d = 0;

	while (nc > 0) {

		d++;
		nc /= 10;

	}

	for (int i = 0; i < d; i++) {

		nrev += (n % 10) * pow(10, d - i - 1);
		n /= 10;

	}

	cout << nrev;

}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
  using namespace std;
 int main(){
 int n,x,y;
 cin>>n;
  int a=n/1000;
  int b=(n/100)%10;
  int c=(n/10)%100 ;
  int d=n%10;
  cout<<d;
  if(c>0) cout<<c;
  if(b>0) cout<<b;
  if(a>0) cout<<a;







}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
int y=1,i,n,m,x=10;
cin>>n;
m=n%10;

while((n/10)!=0){
y++;
}
for(i=1;i<y;i++){
x=x*10;
m=m*10+((m%x)/x)*10;
}
cout<<m;

}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <simplecpp>
main_program{
int n,m,i;
cin>>n;
i=0;
bool flag1;
m=n;
while(n>0){
flag1 = m%10==i;
if(!flag1) break;
m=m/10;}

n=m;
for(i=n;i>0;i=i/10){
int a;
a= n%10;
cout<<a;
n=n/10;};
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <iostream>

using namespace std;

int main()
{

 int n,m=0;
 cin>>n;

 int d;

 while(n>0)
 {
   d=n%10;
   m=m*10 +d;
   n=n/10;
 }

 cout<<m;
 return 0;

}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;

int main(){
 int n,reverse=0,rem;
cin>>n;
while(n!=0){
     rem=n%10;
     reverse=reverse*10+rem;
     n/=10;}
     cout<< reverse<< endl;
     return 0;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<simplecpp>
main_program{
	int a,b=0;
	cin >> a;
	while(a!=0){
		b=b*10 + (a%10);
		a=a/10;
	}
	cout << b;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n,m=0,d=0,p=1;
cin>>n;
for(int digits=0;n/(int)(pow(10,digits))>=1;digits++){d=digits;};
while(p<d+1){
m=n/(int)pow(10,d);
m=m+(n/(int)pow(10,d-p)*10-(n/(int)pow(10,d-p+1))*(int)pow(10,p));
p++;
}
cout<<m;}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
while(n%10==0){n=n/10;}
int m=0;
while(n>0){
int k;
k=n%10;
m=m*10+k;
n=n/10;}
cout<<m;

}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
#include<cmath>
using namespace std;
int main(){
	int n,d=1,r=1,dig;
	cin>>n;
	if(n==1) cout<<d;
	for(int i=1;d<=n;i++){
			d=pow(10,i);
			r=pow(10,i-1);
			dig=(n%d-n%r)/(pow(10,i-1));
			if(dig!=0)cout<< dig;
			}
	
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
int n,m,k;
int r; cin>>n;r=n%10;
if(r!=0){
while(n>0){
r=n%10;
n=n/10;
cout<<r;
}
}
if(r==0){
while(r==0){
m=n=n/10;
k=r=n%10;}
while(m>0){
k=m%10;
m=m/10;
cout<<k;}


}
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;

int main() {
	int n; cin >> n;
	int j = n;
	int m = 0;
	while (j!=0) {
		m = m*10 + j%10;
		j/=10;
	}
	cout << m;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int m =(n/10);
 int q =(n-m);
int a=n/100;
int b=(n-a)/10;
int c=n-(a+b);
int d=n/1000;
int e=(n-d)/100;
int f=(n-(d+e))/10;
int g=n-(d+e+f);
 if (n<10)
 cout<<n;

 else if (n<100) 
 cout<<q<<m;

 else if (n<1000) 
cout<<c<<b<<a;

else if (n<10000) 
cout<<g<<f<<e<<d;

return 0;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<simplecpp>
main_program{


int m,rem,reverse_number=0;
cin>>m;

while(m!=0){
rem=m%10;
  if(rem==0)
  cout<<"";
  if(rem!=0){
  reverse_number=reverse_number*10+rem;
  }
m=m/10;
} 

cout<<reverse_number;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
#include<cmath>
using namespace std;

int main(){

int n;
cin>>n;
int y=n;
int m=0;
int i=0;
while(n>0){
		n=(n-n%10)/10;
		i++;    }
int x=i;
int k=1;
n=y;
while(k<=x){
		m=m+(n%10)*pow(10,i-1);
		n=(n-n%10)/10;
		i--; k++;     }

cout<<m;

}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<simplecpp>
main_program{
	//declearing variables and taking input
	int n,m=0,digit=0;
	cin>>n;
	while (n>0){
		if (n%10 !=0){
			digit = n%10;
			m = m*10 +digit ;
			n /=10;
		}else{
			n /=10;
			continue;
		}
	}//output
	cout<<m;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
int n,m;
cin>>n;
m = left(n);
cout<<"m";
return 0;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
  int n,m=0,rem;
  cin>>n;
  while(n/10>0){
    rem=n%10;
    m=m*10+rem;
    n=n/10;
   }
  cout<<m*10+n;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <simplecpp>
main_program {
	int n,m=0,nd=1; cin>>n;
	for(int i=n;i>0;i=i/10){
		nd=nd*10;
	}
	nd=nd/10;
	for(int i=n;i>0;i=i/10){
		int d=n%10;
		n=n/10;
		m=m+d*nd;
		nd=nd/10;
	}
	cout<<m;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
int n,m;
cin>>n;
m=0;
while(n>0){
m=10*m+(n%10);
n=n/10;


}
cout<<m;

}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int m;
m=0;
int r;
r=n;
while(r>0)
{
m=m*10+r%10;
r=r/10;
}
cout<<m;
return 0;}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
#include<cmath>
using namespace std;
int main(){
  int n,k=0,m=0,b=0;cin>>n;
  k=log10(n)+1;
  for(int i=0;i<k;i++){
  b=n%10;if(b!=0){cout<<b;}
  m=m+b*(pow(10,n-i-1));
  n=n/10;}
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include <iostream>
using namespace std;

int main(){
int k;
cin>>k;

while(k%10 == 0){
    k=k/10;
}
int digit,number=0,m=1,n=10;
while(k/n != 0){
    n=10*n;
    m++;
}

for(int i=1; i<=m; i++)
{
    digit=k%10;
    k=k/10;
    number=number*10+digit;
}
cout<<number;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
int n,m=0,digit;
cin>>n;
while(n>0)
{
 digit=n%10;
 n=n/10;
 if (m==0)
{
  if(digit==0) continue;
}
 m=m*10+digit;
}
cout<<m;
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
using namespace std;
int main(){
	
}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A
Problem: Write a C++ program that takes a positive integer n as input from the user and prints a number m whose digits are in reverse order as compared to n. If the number ends in one or more zeroes, then those zeroes should be ignored while printing the reverse.

Student submission:
#include<iostream>
int main(){
int n;
std::cin>>n;
while(n%10==0){n=n/10;}
while(n>0){std::cout<<n%10;n=n/10;}}

Grading criterion: Array usage
Rating A: No arrays used
Rating B: Arrays used
Rating C: 0
Rating D: 0
Assigned grade: A