#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main() { char a[1000]; int i; while(gets(a)!=NULL){ for(i=0;i<strlen(a);i++){ if(a[i]=='s' || a[i]=='S'){ if(a[i+1]=='a' || a[i+1]=='A'){ if(a[i+2]=='l' || a[i+2]=='L'){ if(a[i+3]=='t' || a[i+3]=='T'){ puts(a); } } } } } } } |
Double click to view unformatted code.