Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int Izbaci (char *s)
- { int br_samogl=0;
- char *p=s;
- while (*s!='\0') {
- if ((tolower(*s)>='a' && tolower(*s)<='z' && *(s-1)==' ') || (tolower(*s)>='a' && tolower(*s)<='z' && s==p )) {
- char *poc=s;
- while (*s!=' ') {
- if (tolower(*s)=='a' || tolower(*s)=='e' || tolower(*s)=='i' || tolower(*s)=='o' || tolower(*s)=='u')
- br_samogl++;
- s++; }
- char *kraj=s;
- poc--;
- if (br_samogl>=3) {
- while (*kraj!='\0') {
- *poc++=*kraj++;
- }}
- while (*p!='\0') p++;
- *(p-(kraj-poc))='\0';
- }
- else s++;
- br_samogl=0;
- }}
- int main () {
- char s[]="Ovo je recenica. ";
- Izbaci(s);
- printf("%s",s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement