Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- int main() {
- char *p,s[256],voc[]="AEIOUaeiou",cuv[256];
- int ok,k=0,lung;
- gets(s);
- // printf("%s",s);
- p=strtok(s," .");
- while(p!=NULL){
- for(int i=0;voc[i]!=NULL;i++){
- if(strchr(p,voc[i])!=NULL){
- k++;
- break;
- }
- }
- strcpy(cuv,p);
- ok=1;
- lung=strlen(cuv);
- for(int i=0;i<lung/2;i++){
- if(cuv[i]!=cuv[lung-i-1]){
- ok=0;
- break;
- }
- }
- if(ok==1) printf("%s ",cuv);
- p=strtok(NULL," .");
- }
- printf("\n%d",k);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement