-
Notifications
You must be signed in to change notification settings - Fork 1
/
Little_jhool_breakup.cpp
55 lines (53 loc) · 1.13 KB
/
Little_jhool_breakup.cpp
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include<iostream>
#include<string.h>
#include<cstring>
using namespace std;
int main()
{
char msg[102];
cin>>msg;
int len=strlen(msg);
bool lindex=false,oindex=false,vindex=false,eindex=false;
int index=0;
for(int i=0;i<len;i++)
{
if(msg[i]=='l')
{
index=i;
lindex=true;
break;
}
}
for(int i=index;i<len;i++)
{
if(msg[i]=='o')
{
index=i;
oindex=true;
break;
}
}
for(int i=index;i<len;i++)
{
if(msg[i]=='v')
{
index=i;
vindex=true;
break;
}
}
for(int i=index;i<len;i++)
{
if(msg[i]=='e')
{
index=i;
eindex=true;
break;
}
}
if(lindex&&oindex&&vindex&&eindex)
cout<<"I love you, too!"<<endl;
else
cout<<"Let us breakup!"<<endl;
return 0;
}