#include <stdio.h>
#include <stdlib.h>

    int buku;
    int jum;
    int total;
    char member;
int main(int argc, char *argv[])
{
    printf("\n---------Tarif Peminjaman Buku-------\n");
    printf("Member                Rp.5000.oo,-\n");
    printf("Non-Member            Rp.15000.oo,-\n");
    printf("Regist Member         Rp.30000.00,-\n");
    printf("-------------------------------------\n");
    printf("Silahkan Masukan Pilihan Anda\n");
    printf("Jumlah Buku : ");
    fflush(stdin);
    scanf( "%d",&jum );
    printf("Apakah anda member [Y/T]");

    fflush(stdin);
    scanf("%c",&member);

    if (member !='y')
    {
        total=5000*jum;
        printf("Total       : %s \n",total);
    }
    else (member !='t');
    {
        total=15000*jum;
        printf("Total       : %s \n",total);
    }
    system("Pause");
    return 0;
}

why this erorr?

why this erorr?

What error?

i compile and " windows has stop working"

what compiler are you using, and what version of windows?

Replace
system("Pause");
with
getchar(); // wait

Also at line 23 else (member !='t'); remove the ;.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.