Facebook
From Denim Guinea Pig, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 170
  1. #include <iostream>
  2. #include <math.h>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6.  
  7.  
  8.  
  9. void show( int & a )
  10. {
  11.     // Jezeli w argumencie funcji dodamy znak & to działamy na oryginale jezeli nie to na kopi
  12.     cout << "Wartosc: " << a <<endl;
  13.     a += 10;
  14.  
  15.     cout << "Wwynik po dodaniu: " << a <<endl;
  16. }
  17.  
  18. int main()
  19. {
  20.     int b = 7;
  21.     cout << "Wprowadzona liczba = " << b <<endl;
  22.     show(b);
  23.     cout << "Wartosc po zastosowaniu funkcji = " << b << endl;
  24.     return 0;
  25. }