Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
- #include <math.h>
- int rek(char *niza) {
- if(*(niza) == '\0') {
- return 0;
- }
- if(isalpha(*(niza))) {
- if(*(niza + 1) == '\0') {
- return 1;
- }
- return rek(niza + 2) + 1;
- }
- else {
- return rek(niza + 1);
- }
- }
- int main(int argc, char *argv[]) {
- char niza[10]={'a','e','.','.','E','.','C','A','B','\0'};
- printf("%d\n", rek(niza));
- return 0;
- }
- /*
- 1 0 2 4
- 3 3 23 5
- 3 5 5 6
- 0 3 12 7
- 1 7
- **/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement