Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<conio.h>
- using namespace std;
- void wypelnij(int t[], int k)
- {
- for(int i=0;i<k;i++)
- {
- cout<<"Podaj liczby do tablicy o indeksie " <<i <<endl;
- cin>>t[i];
- }
- }
- void wypisz(int t[], int k)
- {
- cout<<"[";
- for(int i=0;i<k;i++)
- {
- cout <<t[i] <<";" ;
- }
- cout<<"]";
- }
- int main()
- {
- int n;
- cout<<"Ile elementów ma mieć podana funkcja" <<endl;
- cin>>n;
- int tab1[n];
- wypelnij(tab1,n);
- wypisz(tab1,n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement