I wrote this code:
float suma;
int centy;
int cele;
printf("Zadaj sumu a ja ti ju napisem a zaroven aj vysklonujem:\n");
scanf("%f",&suma);
cele=(int)suma;
centy= (suma-cele)*100;
switch ((int)suma) {
    case 1:
        printf("%d euro",(int)suma);
        break;
    case 2 ... 4:
        printf("%d eura",(int)suma);
        break;
    default:
        printf("%d eur",(int)suma);
        break;
}
switch (centy) {
    case 1:
        printf(" a %d cent\n",centy);
        break;
    case 2 ... 4:
        printf(" a %d centy\n",centy);
        break;
    default:
        printf(" a %d centov\n",centy);
        break;
}
But when I type 5.56 it will say that I have typed 5.55 in console. What do you think. What should I change? I am newbie so...
 
    