Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int rozmiar=0,y;
- cout<<"ile liczb chcesz wpisac do tablicy - ";
- cin>>y;
- while(y>0)
- {
- y--;
- rozmiar++;
- }
- int x=0, tab[rozmiar];
- for (int i=1;i<=rozmiar;i++)
- {
- cout<<"podaj "<<i<<" liczbe - ";
- cin>>tab[x];
- x++;
- }
- for (int k=1;k<=rozmiar;k++)
- {
- x=0;
- cout<<k<<" element tablicy to - "<<tab[x]<<endl;
- x++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement