Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int num, mas1[num], mas2[num];
- int buf1;
- cout << "Enter the mas number: ";
- cin >> num;
- cout << "Enter mas:";
- for (int i = 0; i < num; i++)
- {
- cin >> mas1[i];
- }
- // cout << "Initial mas:";
- // for (int i = 0; i < num; i++)
- // {
- // cout <<" "<< mas1[i];
- // }
- for (int i = num - 1; i > 0; i--)
- {
- mas2[i] = mas1[num-1-i];
- }
- for (int i = 0; i < num; i++)
- {
- cout <<" "<< mas2[i];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement