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. cout<<"I ";
  11. if(i%2==1) cout<<"hate ";
  12. else cout<<"love ";
  13. if(i<n) cout<<"that ";
  14. else cout<<"it";
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 4188KB
stdin
2
stdout
I hate that I love it