fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define GG ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  4. int main () { GG;
  5. int n,c=1; cin>>n;
  6. while(c<=n)
  7. {
  8.  
  9. if(c%2 !=0)
  10. { cout<<"I hate ";
  11.  
  12. }
  13. else
  14. {cout<<"I love ";
  15.  
  16. }
  17.  
  18. if(c!=n) cout<<"that ";
  19. else cout<<"it ";
  20. c++;
  21. }
  22. return 0;}
Success #stdin #stdout 0.01s 5280KB
stdin
3
stdout
I hate that I love that I hate it