fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n;
  7. cin>>n;
  8. for(int i=1;i<=n;i++)
  9. {
  10. if(i%2!=0)
  11. {
  12. cout<<"I hate"<<" ";
  13. }
  14. else
  15. {
  16. cout<<"I love ";
  17. }
  18. if(i!=n)
  19. {
  20. cout<<"that ";
  21. }
  22. else
  23. {
  24. cout<<"it";
  25. }
  26. }
  27. return 0;
  28. }
Success #stdin #stdout 0.01s 5300KB
stdin
2
stdout
I hate that I love it