forked from sat5297/hacktober-coding
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Hulk.java
41 lines (37 loc) · 984 Bytes
/
Hulk.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import java.util.*;
import java.lang.*;
import java.io.*;
public class Hulk {
public static void main(String args[]) throws java.lang.Exception
{
int n = 0 , count = 0;
String hate = "I hate ";
String love = "I love ";
String it = "it";
String that = "that ";
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
try
{
n = Integer.parseInt(br.readLine());
}
catch(Exception e)
{
return;
}
System.out.print(hate);
for(int i = 2 ; i < n+1 ; i++)
{
if(i%2 == 0)
{
System.out.print(that);
System.out.print(love);
}
else
{
System.out.print(that);
System.out.print(hate);
}
}
System.out.print(it);
}
}