Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int broj=0;
- int zZ=0; //zZ = zadnja Znamenka
- int z2Z=0; // z2Z = zadnje 2 Znamenke
- printf("Unesite neki cijeli broj: ");
- scanf("%d",&broj);
- if (broj<0)
- { printf("\nBroj je negativan!\n"); }
- else
- {
- zZ = broj % 10;
- z2Z = broj % 100;
- if (zZ == 1 && z2Z != 11)
- { printf("NOMINATIV jednine!\n"); }
- else if ((zZ == 2 && z2Z != 12) || (zZ == 3 && z2Z != 13) || (zZ == 4 && z2Z != 14))
- { printf("GENITIV jednine!\n"); }
- else
- { printf("GENITIV jednine"); }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment