Skip to content

Instantly share code, notes, and snippets.

@gopalkriagg
Created September 10, 2016 19:00
Show Gist options
  • Save gopalkriagg/5baff2a673a2981c26dc5a3a572352e6 to your computer and use it in GitHub Desktop.
Save gopalkriagg/5baff2a673a2981c26dc5a3a572352e6 to your computer and use it in GitHub Desktop.
#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