Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void modyfikuj(int liczba)
- {
- liczba *= 2;
- }
- void modyfikuj_tab(int* tablica)
- {
- for(int i = 0; i < 5; ++i)
- tablica[i] = i;
- }
- int main()
- {
- int liczba = 10;
- modyfikuj(liczba);
- cout << liczba << endl;
- int tablica[5];
- for(int i = 0; i < 5; ++i)
- tablica[i] = 0;
- for(int i = 0; i < 5; ++i)
- cout << tablica[i] << '\t';
- cout << endl;
- modyfikuj_tab(tablica);
- for(int i = 0; i < 5; ++i)
- cout << tablica[i] << '\t';
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement