Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. //////////////////////////////////
  2. //basic programming cheat sheet///
  3. //////////////////////////////////
  4.  
  5. void DoSomething(){ // void means function! without returns
  6.  
  7. int getal; //declares a variable of type int
  8. getal = 5; //set variable to 5
  9.  
  10. getal = DoSomethingElse(getal);
  11.  
  12. /// oeveel is getal ? :D
  13. }
  14.  
  15. int DoSomethingElse(int getal){ // a function that returns a int and requires a int
  16.  
  17. int newgetal = getal + 2;
  18.  
  19. return newgetal;
  20.  
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement