Advertisement
piffy

Multifile workshop start

Jan 1st, 2020
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. #define STRING "Multiple Hello World!"
  4.  
  5. #define N 4
  6.  
  7. #define DEBUG 1
  8.  
  9.  
  10. using namespace std;
  11.  
  12. void message(int n) {
  13.     for (int i=0; i<n; i++)
  14.         {
  15.             cout <<STRING<<endl;
  16. #ifdef DEBUG
  17.         cout << "Check: current value of i is " << i << endl;
  18. #endif  
  19.         }
  20.        
  21. }
  22.  
  23.  
  24. int main()
  25. {
  26.     message(N);
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement