Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // pole.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- const int N = 10;
- int pole[N];
- cout << "zadajte cisla do pola: \n";
- for (int i=0; i<N; i++)
- cin >> pole[i];
- cout <<"\nObsah pola pod seba:\n";
- for (int i=0; i<N; i++)
- cout << pole[i] << ", ";
- cout << endl;
- cout <<"\nObsah pola vedla seba:\n";
- for (int i=0; i<N; i++)
- cout << pole[i] << "\n";
- cout << endl;
- cout <<"\nObsah pola v opacnom poradi:\n";
- for (int i=N; i>=0; i--)
- cout << pole[N-1-i] << ", ";
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement