Advertisement
rotti321

cuv cu vocale C

Feb 23rd, 2022
35
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4. int main() {
  5. char *p,s[256],voc[]="AEIOUaeiou";
  6. int ok,k=0;
  7. gets(s);
  8. // printf("%s",s);
  9. p=strtok(s," .");
  10. while(p!=NULL){
  11. for(int i=0;voc[i]!=NULL;i++){
  12. if(strchr(p,voc[i])!=NULL){
  13. k++;
  14. break;
  15. }
  16. }
  17. p=strtok(NULL," .");
  18. }
  19. printf("%d",k);
  20. return 0;
  21. }
Advertisement
RAW Paste Data Copied
Advertisement