CPP   60

reverse

Guest on 20th April 2022 02:10:32 AM

  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6.  
  7.  
  8. int main () {
  9.     int a[3]={30,20,10};
  10.     int b[3];
  11.  
  12.     for (int i=0;i<3;i++) {
  13.         cout << a[i] << endl;
  14.     }
  15.  
  16.     cout << endl;
  17.  
  18.     for (int i=2;i>=0;i--) {
  19.         cout << a[i] << endl;
  20.     }
  21.  
  22.     return 0;
  23. }

Raw Paste


Login or Register to edit or fork this paste. It's free.