Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main(int argc, char *argv[])
- {
- cout<<"podaj ilość elementow";
- srand(time(NULL));
- int n;
- cin>>n;
- if (n>0 && n<31){
- cout<<"przetwazanie tablicy"<<endl;
- int tab[30];
- for (int i=1;i<=n;i++)
- {
- int liczba;
- liczba = rand()%101;
- tab[i] = liczba;
- };
- for(int i=1;i<=n;i++)
- cout<<tab[i]<<endl;}
- else
- cout<<"tablica ma niedozwoloną liczbe elementow";
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement