Advertisement
Guest User

v1

a guest
Aug 2nd, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void fungsi(int *b)
  5. {
  6. *b = *b + 1;
  7. }
  8.  
  9. int main()
  10. {
  11. int a;
  12. cout << "a: ";
  13. cin >> a;
  14. cout << "a awal : " << a << endl;
  15. fungsi(&a);
  16. cout << "a sekarang : " << a << endl;
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement