Advertisement
Felanpro

Functions Basic Understanding (Knowledge)

Nov 21st, 2015
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void simpleFunction();
  5.  
  6. int main()
  7. {
  8.     cout << "Test!" << endl;
  9.     cout << endl;
  10.    
  11.     simpleFunction();
  12.    
  13.     return 0;
  14.     }
  15.  
  16. void simpleFunction()
  17. {
  18.      int x;
  19.      
  20.      cout << "type in number: ";
  21.      cin >> x;
  22.      cout << "The number u typed in was: " << x << endl;
  23.      system("pause");
  24.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement