Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char const *argv[])
- {
- char jmbg[20];
- printf("Unesite jmbg: ");
- scanf("%s", jmbg);
- int i = 0;
- while(jmbg[i] != 0)
- i++;
- if(i != 13)
- {
- printf("Greska");
- exit(1);
- }
- printf("Datum rodjenja je: %c%c.%c%c.%c%c%c\n", jmbg[0], jmbg[1], jmbg[2], jmbg[3], jmbg[4], jmbg[5], jmbg[6]);
- int bbb = atoi(&jmbg[9]);
- bbb = bbb/10;
- if (bbb > 499)
- printf("Muski");
- else
- {
- printf("Zenski");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement