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

using namespace std;

int main()

    string custname,carmodel,carnum;
    int days=0,rentalfee=0;

    cout << "Sila isi nama anda : ";
    cin >> custname;
    cout<<endl;

    do{
    cout<< "Sila berikan pilihan model kereta pilihan anda !"<<endl;
    cout<<"Tekan A untuk model Axia."<<endl;
    cout<<"Tekan B untuk model Saga."<<endl;
    cout<<"Tekan C untuk model Exora."<<endl;
    cout<<endl;
    cout<<"Kereta pilihan anda : ";
    cin >>carmodel;
    cout<<endl;
    if(carmodel !="A" && carmodel !="B" &&  carmodel !="B" )
       cout<<"Pilihan model kereta tidak sah ! sila masuk semula !"<<endl;
    }while(carmodel !="A" && carmodel !="B" &&  carmodel !="C" );

    cout << "Sila berikan maklumat berikut: "<<endl;
    cout <<"---------------------------------------"<<endl;
    cout<<"Kereta No. : ";
    cin >> carnum;
    cout<<"Bilangan hari : ";
    cin >> days;
    cout<<endl;

    if(carmodel == "A") // RM 90 per day
    rentalfee=days*90;
    if(carmodel == "B")//  RM 110 per day
    rentalfee=days*110;
    if(carmodel == "C")//  RM 130 per day
    rentalfee=days*130;

    system("CLS");

    cout << "-----------------------------------------------------------------"<<endl;
    cout << "Nama pelanggan: "+custname<<endl;
    cout << "Model kereta : "+carmodel<<endl;
    cout << "No kereta "+carnum<<endl;
    cout << "Bilangan hari: "<< days<<endl;
    cout << "Jumlah sewaan anda adalah: "<<rentalfee<<endl;
    cout << "-----------------------------------------------------------------"<<endl;

    return 0;
    system("PAUSE");

For comparing strings use strcmp
Replace cout with printf, cin with scanf with %d and %s appropriately

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.