We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Loading...
  • Practice
  • Compete
  • Jobs
  • Leaderboard
  • Hiring developers?
  1. Practice
  2. C++
  3. Introduction
  4. Arrays Introduction
  5. Discussions

Arrays Introduction

  • Problem
  • Submissions
  • Leaderboard
  • Discussions

    You are viewing a single comment's thread. Return to all comments →

  • tritchie329 1 year ago+ 1 comment
    #include <iostream>
    
    using namespace std;
    
    int main() {
    
    	int size;
    	int min;
    	cin >> size;
    	int *myArray = new int[size];
    
    	for (int j = 0; j < size; j++) {
    		cin >> myArray[j];
    	}
    
    	for (int i = size - 1; i >= 0; i--) {
    		cout << myArray[i] << " ";
    	}
    
    	return 0;
    }
    
    1|
    Permalink
    • Aminson_Jets 1 year ago+ 0 comments

      Are the int size and int min always available? Can you explain me what is a int j and int i

      0|
      ParentPermalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature