excusme, please help me. i can't run my program because one mistake "statement missing;"
#include <stdio.h>
#include <conio.h>
#include <iostream.h>
#include <iomanip.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
garis(){
printf(" |===========|=================|===============| ");}
int main(){
char jawab,cust[50],code,hair[50],tipe2[50],tipe,ketikya,bonus[30];
float pembayaran,harga,pot,ppn,total,u_byr,u_kmb, beli,tot_bayar,diskon,jum_bayar;
{
class Simulator{
public :
Simulator();
int ambil_jam();
int proses();
private :
int jam, menit, detik;
};
Simulator::Simulator(){
}
int Simulator::ambil_jam(){
time_t rawtime;
tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
jam=timeinfo->tm_hour; menit=timeinfo->tm_min; detik=timeinfo->tm_sec; }
int Simulator::proses(){
while (true){
clrscr();
cout<<"==========================================\n";
cout<<"||\t\t\t\t\t||\n";
cout<<"||\t\tJAM DIGITAL\t\t\ ||\n";
cout<<"||\t\t ";
cout<<jam<<":"<<menit<<":"<<detik;
cout<<"\t\t||\n";
cout<<"||\t\t\t\t\t||\n==========================================\n\n";
Sleep(1000);
detik=detik+1;
if (detik>59){
detik=0;
menit=menit+1;
if(menit>59){
menit=0;
jam=jam+1;
if(jam>23){
jam=0;
}
}
}
}
}
int main(int argc, char *argv[]) {
Simulator digital;
digital.ambil_jam();
digital.proses();
return 0;
}
cout<<" \n\n***********************************************************************"<<endl;
cout<<"------------------------------KELOMPOK SALON---------------------------\n\n"<<endl;
garis();cout<<"\n No. Absen NAMA KELOMPOK NIM"<<endl;
garis();cout<<"\n "<<endl;
garis();
cout<<"\n 47 FRISKA "<<endl;
garis()
cout<<"\n 55 YOLANDA "<<endl;
garis();
cout<<"\n 12 ALZENA "<<endl;
garis();
cout<<"\n\n KETIK 'Y' UNTUK MELIHAT PROGRAM : ";cin>>ketikya;
if(ketikya=='Y'||ketikya=='y')
goto salon;
salon:
clrscr();
cout<<"\n\n SILAHKAN PILIH 1 UNTUK MENAMPILKAN LIST DAN PEMBAYARAN "<<endl;
cout<<"\n\n\n\n |******************************************|\n"; cout<<" |==========================================|\n";
cout<<" | 1. LIST PERAWATAN |\n";
cout<<" |==========================================|\n"<<endl;
cout<<" KETIK 1 UNTUK MENAMPILKAN LIST DAN PEMBAYARAN : ";cin>>jawab;
if (jawab=='1'||jawab=='1')
goto list;
else if (jawab=='2'||jawab=='2')
goto pembayaran;
else if (jawab=='3'||jawab=='3')
goto end;
else{
clrscr();
cout<<" INPUTAN YANG ANDA MASUKKAN SALAH SILAHKAN PILIH 1/2/3 ";
getch();
goto salon;
}
list:
clrscr();
cout<<" |========================================================|\n";
cout<<" | LIST PERAWATAN |\n";
cout<<" |========================================================|\n";
cout<<" | HAIR TREATMENT | TIPE | HARGA |\n";
cout<<" |----------------------|-----------|---------------------|\n";
cout<<" | 1.Gunting Rambut | Stylish | Rp. 15.000,- |\n";
cout<<" | | Reguler | Rp. 10.000,- |\n";
cout<<" | 2.Cuci + Blow | Stylish | Rp. 20.000,- |\n";
cout<<" | | Reguler | Rp. 15.000,- |\n";
cout<<" | 3.Creambath | Buah | Rp. 35.000,- |\n";
cout<<" | | Matrix | Rp. 60.000,- |\n";
cout<<" | 4.Hair Spa | Makarizo | Rp. 50.000,- |\n";
cout<<" | | L'oreal | Rp. 80.000,- |\n";
cout<<" | 5.Smoothing | Panjang | Rp. 250.000,- |\n";
cout<<" | | Pendek | Rp. 200.000,- |\n";
cout<<" | 6.Toning | Panjang | Rp. 150.000,- |\n";
cout<<" | | Pendek | Rp. 100.000,- |\n";
cout<<" |========================================================|\n";
cout<<" TEKAN Y UNTUK PEMBAYARAN : ";cin>>jawab;
if (jawab=='Y'||jawab=='y')
goto pembayaran;
else if (jawab=='T'||jawab=='t')
goto end;
else{
clrscr();
cout<<" INPUTAN YANG ANDA MASUKKAN SALAH ";
getch();
goto list;
}
pembayaran:
clrscr();
cout<<" |========================================================|\n";
cout<<" | LIST PERAWATAN |\n";
cout<<" |========================================================|\n";
cout<<" | HAIR TREATMENT | TIPE | HARGA |\n";
cout<<" |----------------------|-----------|---------------------|\n";
cout<<" | 1.Gunting Rambut | Stylish | Rp. 15.000,- |\n";
cout<<" | | Reguler | Rp. 10.000,- |\n";
cout<<" | 2.Cuci + Blow | Stylish | Rp. 20.000,- |\n";
cout<<" | | Reguler | Rp. 15.000,- |\n";
cout<<" | 3.Creambath | Buah | Rp. 35.000,- |\n";
cout<<" | | Matrix | Rp. 60.000,- |\n";
cout<<" | 4.Hair Spa | Makarizo | Rp. 50.000,- |\n";
cout<<" | | L'oreal | Rp. 80.000,- |\n";
cout<<" | 5.Smoothing | Panjang | Rp. 250.000,- |\n";
cout<<" | | Pendek | Rp. 200.000,- |\n";
cout<<" | 6.Toning | Panjang | Rp. 150.000,- |\n";
cout<<" | | Pendek | Rp. 100.000,- |\n";
cout<<" |========================================================|\n";
cout<<" TEKAN Y UNTUK PEMBAYARAN : ";cin>>jawab;
if (jawab=='Y'||jawab=='y')
goto regist;
else if (jawab=='T'||jawab=='t')
goto end;
else{
clrscr();
cout<<" INPUTAN YANG ANDA MASUKKAN SALAH ";
getch();
goto regist;
}
regist:
clrscr();
cout<<"\n\n =========================================================\n";
cout<<" Nama Customer : ";cin>>cust;
cout<<" Code Type [1 s/d 6] : ";cin>>code;
cout<<" Tipe Hair Treatment [A/B] : ";cin>>tipe;
cout<<" =========================================================\n";
if (code=='1') { strcpy(hair,"Gunting Rambut");
if (tipe=='A'|| tipe=='a'){
strcpy(tipe2,"Anda memilih tipe stylish");
harga=15000;}
else if(tipe=='B'|| tipe=='b'){ strcpy(tipe2,"Anda memilih tipe reguler");
harga=10000;}
else{
clrscr();
cout<<" INPUTAN TIPE TIDAK TERDITEKSI ";
getch();
goto pembayaran;
}
}
else if(code=='2')
{ strcpy(hair," Cuci + Blow");
if (tipe=='A'||tipe=='a'){
strcpy(tipe2,"Anda memiliki tipe rambut panjang");
harga=20000;}
else if(tipe=='B'|| tipe=='b'){
strcpy(tipe2,"Anda memiliki tipe rambut pendek");
harga=15000;}
else{
clrscr();
cout<<" INPUTAN TIPE TIDAK TERDITEKSI ";
getch();
goto pembayaran;
}
}
else if(code=='3')
{ strcpy(hair," Creambath ");
if (tipe=='A'|| tipe=='a'){
strcpy(tipe2,"Anda memilih tipe buah");
harga=35000;}
else if(tipe=='B'|| tipe=='b'){
strcpy(tipe2,"Anda memilih tipe matrix");
harga=60000;}
else{
clrscr();
cout<<" INPUTAN TIPE TIDAK TERDITEKSI ";
getch();
goto pembayaran;
}
}
else if(code=='4')
{ strcpy(hair," Hair Spa ");
if (tipe=='A'||tipe=='a'){
strcpy(tipe2,"Anda memilih tipe makarizo");
harga=50000;}
else if(tipe=='B'|| tipe=='b'){
strcpy(tipe2,"Anda memilih tipe L'oreal");
harga=80000;}
else{
clrscr();
cout<<" INPUTAN TIPE TIDAK TERDITEKSI ";
getch();
goto pembayaran;
}
}
else if(code=='5')
{ strcpy(hair," Smoothing ");
if (tipe=='A'||tipe=='a'){
strcpy(tipe2,"Anda termasuk tipe rambut panjang");
harga=250000;}
else if(tipe=='B'|| tipe=='b'){
strcpy(tipe2,"Anda termasuk tipe rambut pendek");
harga=200000;}
else{
clrscr();
cout<<" INPUTAN TIPE TIDAK TERDITEKSI ";
getch();
goto pembayaran;
}
}
else if(code=='6')
{ strcpy(hair," Toning ");
if (tipe=='A'||tipe=='a'){
strcpy(tipe2,"Anda termasuk tipe rambut panjang");
harga=150000;}
else if(tipe=='B'|| tipe=='b'){
strcpy(tipe2,"Anda termasuk tipe rambut pendek");
harga=100000;}
else{
clrscr();
cout<<" INPUTAN TIPE TIDAK TERDITEKSI ";
getch();
goto pembayaran;
}
}
else{
clrscr();
cout<<" INPUTAN KODE SALON TIDAK SESUAI ";
getch();
goto pembayaran;
}
clrscr();
cout<<" BEAUTY SALON \n";
cout<<"\n";
cout<<"==========================================================\n";
cout<<" Nama Customer : "<<cust<<"\n";
cout<<" Pilihan List Menu : "<<hair<<"\n";
cout<<" Tipe : "<<tipe2<<"\n";
cout<<" Total Bayar : Rp."<<harga<<"\n";
cout<<" Jumlah Perawatan : ";cin>>beli;
cout<<"==========================================================\n";
cout<<"\n";
pembayaran=harga*beli;
if(beli>=5)
pot=0.1*pembayaran;
else
pot=0;
ppn=0.02*pembayaran;
total=(pembayaran-pot)+ppn;
cout<<"\n";
cout<<" Pembayaran : Rp."<<pembayaran<<"\n";
cout<<" Potongan : Rp."<<pot<<"\n";
cout<<" PPN : Rp."<<ppn<<"\n";
cout<<" Total Bayar : Rp."<<total<<"\n";
cout<<"============================================================\n";
lagi:
cout<<" Uang Bayar : Rp.";cin>>u_byr;
if (u_byr<total)
{goto lagi;
}
else
u_kmb=u_byr-total;
cout<<" Uang Kembali : Rp. "<<u_kmb<<"\n";
cout<<" Jumlah yang dibayar : Rp.";cin>>u_byr;
cout<<" Pembayaran Rp. ";cin>>tot_bayar;
if (tot_bayar>=50000){
diskon=0.1*tot_bayar;
strcpy(bonus,"Sisir Lipat");}
else if (tot_bayar>=80000){
diskon=0.2*tot_bayar;
strcpy(bonus,"Vitamin Rambut 10 ml");}
else
{diskon=0; strcpy(bonus,"Jepit Rambut");}
cout<<"----------------------------------------------------------"<<endl;
cout<<" Selamat kamu mendapat potongan Rp. "<<diskon<<endl;
jum_bayar=tot_bayar-diskon;
cout<<" Kamu hanya perlu membayar Rp. "<<jum_bayar;
cout<<"\n Dan Kamu Mendapat Bonus "<<bonus;
cout<<"\n TERIMAKASIH ATAS KUNJUNGAN NYA :) "<<endl;
cout<<"\n--------------------------------------------------------"<<endl;
getch();
}
cout<<"\n";
cout<<"\n";
cout<<" =====TERIMA KASIH ATAS KUNJUNGAN ANDA=====\n";
cout<<"\n";
cout<<" Input Data Lagi [Y/T] :";
cin>>jawab;
if(jawab=='Y'||jawab=='y')
goto salon ;
else if(jawab=='T'||jawab=='t')
goto end;
end:
return 0;
}
can you help me, please..
[edit]Code block added - OriginalGriff[/edit]
What I have tried:
please help me, without you i can't run my program