Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <stdlib.h>
- using namespace std;
- int main()
- {
- int liczby[ 50 ];
- int dlugosc;
- bool check;
- do
- {
- check = true;
- cout << "Podaj dlugosc ciagu liczb: ";
- cin >> dlugosc;
- if( dlugosc < 2 || dlugosc > 50 )
- check = false;
- cin.clear();
- cin.sync();
- } while( check == false );
- for( int i = 0; i < dlugosc; i++ )
- {
- cout << "Podaj element " << i + 1 << " : ";
- cin >> liczby[i];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement