1. 51.
    0
    #include <stdio.h>
    int main()

    {

    char tur, zaman;
    int dk;
    float fatura;

    printf("tarife turu(h/b/o):");
    scanf("%c",&tur);
    fflush(stdin);

    printf("sabah/gece(s/g):");
    scanf("%c",&zaman);
    fflush(stdin);

    printf("kac dakika:");
    scanf("%d",&dk);
    fflush(stdin);

    switch(tur)
    {
    case 'h':
    if (zaman == 's') fatura=10+(dk*0.05);
    else
    if (zaman == 'g') fatura=10+dk*0.03;
    else printf("hata");
    break;

    case 'b':
    if (zaman == 's') fatura=12+(dk*0.05);
    else
    if (zaman == 'g') fatura=12+dk*0.03;
    else
    printf("hata");
    break;

    case 'o':
    if (zaman == 's') fatura=14+(dk*0.05);
    else
    if (zaman == 'g') fatura=14+dk*0.03;
    else printf("hata");
    break;

    default: printf("hata");

    }

    printf("fatura=%fn",fatura);

    return 0;
    }
    ···
   tümünü göster