Created
September 10, 2016 19:00
-
-
Save gopalkriagg/5baff2a673a2981c26dc5a3a572352e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
char name[] = "milly"; | |
int check = 0; | |
int T; | |
scanf("%d", &T); | |
getchar(); | |
char ch; | |
int flag = 0; | |
while(T--) { | |
flag = 0; | |
check = 0; | |
while(flag == 0 && (ch = getchar()) != '\n') { | |
if(name[check] == ch) { | |
check++; | |
if(check == 5) flag = 1; | |
} | |
} | |
while( ch != '\n' && T != 0) { | |
ch = getchar(); | |
} | |
if(flag) printf("Milly is Intelligent\n"); | |
else printf("Milly is not Intelligent\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment