Linux words by croyal

#include<stdio.h>
#include <ctype.h>
main(){int i,l,n;char c,w[100];while(fgets(w,100,stdin)!= NULL){l=0;n=0;while(w[l]!='\0'){w[l]=tolower(w[l]);l++;};for(i=2;i<l-3;i++){if(w[i]!='n'){n++;}};if(l<6){printf("%d\n",-1);}else{if(w[0]!='l')n++;if(w[1]!='i')n++;if(w[l-3]!='u')n++;if(w[l-2]!='x')n++;printf("%d\n",n);}}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page