CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>;
using namespace std;
int main(){
    int n,x,s=0;
    cin >> n;
    int A[n];
    for(int i=0;i<n;i++){
        cin >> A[i];
    }
    cin >> x;
    for(int i=0;i<n;i++){
        cout << A[n-1-i] << " ";
        if(A[i]>x){
            s=s+A[i];
        }
    }
     cout << endl << s;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

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

int N,X,B=0;
cin>>N;
int arr[N];
for(int j=0;j<N;j++)
{
cin>>arr[j];

}
cin>>X;

for(int h=N-1;h>=0;h--)
{
    cout<<arr[h]<<" ";

}
for(int y=0;y<N;y++)
{
    if(arr[y]>X)
    {
        B=B+arr[y];
    }
    

}
cout<<endl<<B<<endl;
return 0;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

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

 int main() {
 int i,j,N,X,k;

 cin >> N ;
 int arr[N];
for(i=0;i<=N;i++){
    cin >> arr[i];
}
cin >> X;

     for(j=N;j>0;j--) {
        cout << arr[j] << " ";
     }
     int sum=0;
   for(k=0;k<=N;k++) {
    if(arr[k]>X) {
        sum= sum+arr[k];
    }
   }
   cout << sum << endl;
 }

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int inputs[n]={};
    for(int i=0;i<n;i++)
    {
        cin>>inputs[i];
    }
    
    int X;
    cin>>X;
    int sum=0;
    for(int k=0;k<n;k++)
    {
        if(inputs[k]>X)
        {
            sum+=inputs[k];
        }
    }
    for(int j=(n-1);j>=0;j--)
    {
        cout<<inputs[j]<<" ";
    }
    cout<<endl;
    cout<<sum<<endl;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<bits/stdc++.h>
using namespace std;

int main()
{
int n; // the vector size;
cin>> n;
vector<int> v;
for(int i=0;i<n;i++){
int x;
cin>> x;
v.push_back(x);
}

int t;
cin>> t; //the greater
for(int i=n-1;i>=0;i--){
    cout<< v[i]<< " ";
}
cout<< endl;
int sum=0;
for(int i=0;i<n;i++){
   if(v[i]>t){
           sum=sum+v[i];
   }
}
cout<< sum;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include <iostream>
using namespace std;
int main() {
    int n;
    int arr[n];
    int x;
    cin>>n;
    for(int i=0; i<n; i++) {
        cin>>arr[i];
    }
    cin>>x;
    for(int i=(n-1); i>=0;i--) {
        cout<<arr[i]<<" ";
    }
    
    int sum=0;
    for(int i=0; i<n; i++) {
        if(arr[i]>x) {sum = sum + arr[i];}
    }
    cout<<endl;
    cout<<sum;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

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

int main(){
    int N;
    cin>>N;
    int a;
    int arr[N];

    for(int i=0;i<N;i++){
        cin>>arr[i];
    }

    for(int j=0;j<N;j++){
        cout<<arr[N-(j+1)]<<" ";
    }
    cout<<endl;

    int X;
    cin>>X;

    int sum=0;

    for(int k=0;k<N;k++){
        if(arr[k]>X){
            sum +=arr[k];
        }
    }
    cout<<sum;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main()
{
    int N;
    cin>>N;
    int a[N];
    for( int i=0;i<N;i++)
    {
        cin>>a[i];
    }
    for( int i=N-1 ; i>=0;--i)
    {
        cout<<a[i]<<" ";
    }
    cout<<""<<endl;
    int sum=0;
    int X;
    cin>>X;
    for( int i=0;i<N;i++)
    {
        if( a[i]>X) 
        {
            sum+= a[i];
        }
    }
    cout <<sum;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main(){
int size=1000;
int n, X,sum=0;
cin>>n;
int A[size]={};
for(int i=0;i<n;i++){
    cin>>A[i];
}
cin>>X;
for(int i=(n-1);i>=0;i--){
    cout<<A[i]<<" ";
}
cout<<endl;
for(int i = 0; i<n; i++){
    if(A[i]>X){
        sum += A[i];
    }
}
cout<<sum;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main() {
    int N;
    cin>>N;
    int A[N];
    for (int i=0; i<N; i++) {
        cin>>A[i];

    }
    int X;
    cin>>X;
    for (int i=N-1; i>-1; i--) {
        cout<<A[i]<<" ";
    }
    cout<<endl;
    int sum=0;
    for (int i=0; i<N; i++) {
        if (A[i]>X)
        sum+=A[i];
    }
    cout<<sum<<endl;
    return 0;

}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include <iostream>

int main() {
    
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: C
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int X,N;
int Arr[N];
int sum=0;
cin>>N;
for(int i=0; i<N;i++){
    cin>>Arr[i];}
    cin>>X;
    for(int i=(N-1); i>=0;i--){
    cout<<Arr[i]<<" ";}
for(int i=0;i<N ;i++){
    if(Arr[i]>X){

    sum=sum+Arr[i];
}
cout<<sum;
}
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

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

int main (){
    int n; cin >> n;
    vector <int> v (n);

    for (int i = 0; i <n; i++)
        cin >> v[i];
    
    int x; cin >> x;
    int s = 0;

    for (auto p = v.end()-1; p>=v.begin(); p--) {
        cout << *p << " ";
        if (*p > x) s += *p;
    }
    cout << endl << s;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main(){
    
    int n;
    cin >>n;
    int arr[n];
    int brr[n] = {};
    
    for (int i=0;i<n;i++){
        cin>>arr[i];
    }
    int x;
    cin>>x;
    for (int i=0;i<n;i++){
        brr[n-1-i]=arr[i];
        }
    for(int i=0 ; i<n ; i++){
        cout<<brr[i]<<" ";
    }
     int sum =0;
    for (int i=0;i<n;i++){
        sum = sum + arr[i];

    }
    cout<<sum;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

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

int main(){
    
    int i, n, X;
    cin>>n;
    int arr[n];

for(int i = 0; i < n; i++) {
    cin >> arr[i];
    }

for(int i = n-1; i>=0; i--) {
cout << arr[i] << " ";
} 


cin>>X;

int sum=0;

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

    if (arr[i]>X){sum = sum + arr[i];}
         }
cout<<endl<<sum;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include <iostream>
using namespace std;
int main(){
    int n;
    int arr[n];
    int X;
    cin>>n;
    for(int i=0;i<n;i++){cin>>arr[i];}
    cin>>X;
for(int j=n-1;j>=0;j--){cout<<arr[j]<<" ";}
int sum=0;
for(int i=0;i<n;i++){
    if(arr[i]>X){sum+=arr[i];}
}
    cout<<endl<<sum;

}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

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

void readNumbers(int arr[], int N){
    for(int i=0; i<N;i++){
    cin>>arr[i];
   }
 
}

int main(){
   int arr[500],N,X;
    cin>>N;
    readNumbers(arr,N);
    for(int i=N-1;i>=0;i--){
    cout<<arr[i]<<" ";
}
cin>>X;

    }

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<simplecpp>
main_program {
vector<int> v1 (N);
std::vector<int> A = {1,2,3};
A[0] = -1;
for(int i=0; i < A.size(); i++)
cout << A[i] << " ";
std::vector<char> B;
B.push_back('a'); B.push_back('b');
B.resize(4,'z');
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: C
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include <iostream>
using namespace std;
int main(){
    int x, n, sum=0;
    int A[100];
    cin >> n;

    for (int i=0; i<n; i++){
        cin >> A[i];
    }

    cin >> x;
    
    for(int j=0; j<n; j++){
        cout << A[n-1-j] << " ";
    }

    for (int k=0; k<n; k++){
        if (A[k]>x) sum += A[k];
    }

    cout << endl << sum;
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
void reverseOrder(int arr[], int n){
    int i=0;
    while(i<n/2){
        swap(arr[i],arr[n-i-1]);
        i++;
    }
}
    int sum(int arr[], int n, float x){
        int sum=0;
        for(int i=0; i<n;i++){
        if(arr[i]>x){
            sum=sum+arr[i];
        }
        }
        return sum;
    }

int main(){
    int n;
    float x;
    cin>>n;
    int arr[n];
    for(int i=0; i<n; i++){
        cin>>arr[i];

    }
    cin>>x;
    reverseOrder(arr,n);
    for(int i=0; i<n; i++){
        cout<<arr[i]<<" ";
    }
    cout<<endl;
    
    cout<<sum(arr, n, x);
    
}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Write a C++ program that performs the following operations:
1. Input:
   Accept an integer 'n' representing the size of an array.
   Accept 'n' integer elements and store them in the array.
   Accept another integer 'x'.

2. Reverse Printing:
   Print the array elements in reverse order separated by spaces

3. Sum Calculation:
   Calculate and display the sum of all elements greater than 'x'

### Input Format
n
A1 A2 A3 ... An
x

### Output Format
First line: elements of the array in reverse order
Second line: sum of all elements greater than 'x'

### Constraints
'1 ≤ n ≤ 1000'
'-10^6 ≤ A[i], x ≤ 10^6'

Student submission:
#include<iostream>
using namespace std;
int main()
{
    int n,x,s=0;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++) cin>>a[i];
    cin>>x;
    for(int i=n-1;i>=0;i--)
    {
        if(a[i]>x) s+=a[i];
        cout<<a[i]<<' ';
    }
    cout<<"\n"<<s;

}

Grading criterion: Prints array/vector in reverse
Rating A: Correctly prints the array/vector in reverse order

Rating B: Some issue. 
Rating C: Major issue. 

Rating D: 0
Assigned grade: A