Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 9 int isupcase(char *str)
- 30 {
- 31 if (!*str)
- 32 return (1);
- 33 return ('A' <= *str && *str <= 'Z' ? isupcase(str + 1) : 0);
- 34 }
- 35
- 36 #include <stdio.h>
- 37 int main()
- 38 {
- 39 char *words1[] = {"Hello", "World", "RTFM", "LMGIFY", "GIYF", "NSFW", 0};
- 40 char *words2[] = {"O miseras", "homini", "mentis", "O pectora", "caeca", 0};
- 41 if (ft_count_if(words1, &isupcase) == 4 && !ft_count_if(words2, &isupcase))
- 42 printf("ok");
- 43 else
- 44 printf("nope");
- 45 return (0);
- 46 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement