Advertisement
TheWhiteFang

[C++][8] Creating Functions that use parameters

Oct 12th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream> //pre-processor directive
  2.  
  3. using namespace std; //std library
  4.  
  5. void printCrap(int x){ //what type of data and variable name
  6.     cout << "favourite number is " << x << endl;
  7. }
  8.  
  9. int main() //it starts with the main 1st
  10. {
  11.     printCrap(20);
  12.     return 0; //to tell that program ran fine
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement