Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int Izbroj (char *s,int n) {
- char *p=s;
- int brojac=0, br_rijeci=0;
- while (*s!='\0') {
- if (tolower(*s)>='a' && tolower(*s)<='z')
- {
- s++;
- brojac++;
- while (tolower(*s)>='a' && tolower(*s)<='z') {
- brojac++;
- s++;
- }
- if (brojac==n) br_rijeci++;
- }
- else s++;
- brojac=0;
- }
- return br_rijeci;
- }
- int main () {
- char s[]="Ovo je papir recenica selma ";
- printf("%d",Izbroj(s,5));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement