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.
  • Practice
  • Certification
  • Compete
  • Career Fair
  • 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 →

  • hrushi_makode 2 years ago+ 0 comments
    int main() {
      int n, i = 0;
      cin >> n;
      int a[n];
      for (; i < n; i++)
        cin >> a[i];
      for (; i >0; i--)
        cout << a[i- 1] <<" ";
      return 0;
    }
    
    -8|
    ParentPermalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature