Guest User

Attempt 2

a guest
Sep 14th, 2013
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include "simpletools.h" // Include simpletools
  2.  
  3. void hello(void); // Function prototype
  4. void goodbye(void);
  5.  
  6. int main() // main function
  7. {
  8. for(int i = 1; i <= 10; i++)
  9. {
  10. hello(); // Call hello function
  11. goodbye();
  12. }
  13. }
  14.  
  15. void hello(void) // Hello function
  16. {
  17. print("Hello from function!\n"); // Display hello message
  18. pause(500); // Pause 1/2 second
  19. }
  20.  
  21. void goodbye(void)
  22. {
  23. print("Goodbye from function!\n");
  24. pause(500);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment