SlideShare a Scribd company logo
1 of 3
Download to read offline
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
void gotoxy(int x, int y)
{
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
int main()
{
char lagi,nama_kasir[15], ntransaksi[10], kode_susu, jenis_susu[15], kode_kasir[15];
float uang_bayar, jumlah_beli, harga, tharga, jharga, diskon, total_bayar, kembali;
ulang:
system("cls");
cout<<"-------------------------------------------"<<endl;
cout<<"n TOKO SUSU BAYI "<<endl;
cout<<"n -MILK COUNTER- "<<endl;
cout<<"n==========================================="<<endl;
cout<<"Input Nomor Transaksi : ";cin>>ntransaksi;
cout<<"Input Kode Kasir [01/02/03] : ";cin>>kode_kasir;
cout<<"-------------------------------------------"<<endl;
cout<<"Pilih Kode Susu [N/L/B] : ";cin>>kode_susu;
cout<<"Input Jumlah Beli : ";cin>>jumlah_beli;
cout<<"-------------------------------------------"<<endl;
system("cls");
if (kode_susu == 'N'||kode_susu == 'n')
{
strcpy(jenis_susu,"Nutrilon Baby");
harga=125000;
}
else if (kode_susu == 'L'||kode_susu == 'l')
{
strcpy(jenis_susu,"Lactogen Baby");
harga=105000;
}
else if (kode_susu == 'B'||kode_susu == 'b')
{
strcpy(jenis_susu,"Morinaga");
harga=135000;
}
else
{
system("cls");
gotoxy(20,12);
cout<<" ANDA SALAH MEMASUKKAN KODE SUSU ";
gotoxy(20,13);
cout<<"**** TEKAN ENTER UNTUK MENGULANG *****";
getch();
system("cls");
goto ulang;
}
if (strcmp(kode_kasir, "01") == 0)
{
strcpy(nama_kasir,"Budi");
}
else if (strcmp(kode_kasir, "02") == 0)
{
strcpy(nama_kasir,"Slamet");
}
else if (strcmp(kode_kasir, "03") == 0)
{
strcpy(nama_kasir,"Paijo");
}
else
{
system("cls");
gotoxy(20,12);
cout<<" ANDA SALAH MEMASUKKAN KODE KASIR ";
gotoxy(20,13);
cout<<"**** TEKAN ENTER UNTUK MENGULANG *****";
getch();
system("cls");
goto ulang;
}
cout<<"-------------------------------------------"<<endl;
cout<<"n TOKO SUSU BAYI "<<endl;
cout<<"n -MILK COUNTER- "<<endl;
cout<<"n==========================================="<<endl;
cout<<"No. Nota : "<<ntransaksi<<" "<<"Nama Kasir : "<<nama_kasir;
cout<<"n-------------------------------------------"<<endl;
cout<<"Merk Susu : "<<jenis_susu<<endl;
cout<<"Harga : "<<harga<<endl;
cout<<"Jumlah Beli : "<<jumlah_beli<<endl;
cout<<"n-------------------------------------------"<<endl;
tharga=harga*jumlah_beli;
diskon=0.05*tharga;
jharga=tharga-diskon;
cout<<"Jumlah Harga : "<<jharga<<endl;
cout<<"Diskon : "<<diskon<<endl;
total_bayar=jharga-diskon;
cout<<"-------------------------------------------"<<endl;
cout<<"Total Bayar : "<<total_bayar<<endl;
cout<<"Uang Bayar : ";cin>>uang_bayar;
kembali = uang_bayar - total_bayar;
cout<<"Kembali : "<<kembali<<endl;
cout<<"-------------------------------------------"<<endl;
cout<<" Terima kasih Atas Kunjungan Anda "<<endl<<endl;
cout<<" Input Data Lagi?[y/t] : ";cin >> lagi;
if(lagi=='y'){
goto ulang;
}
getch();
}

More Related Content

What's hot (20)

Litebox
LiteboxLitebox
Litebox
 
Sol9
Sol9Sol9
Sol9
 
Penggunaan Array pada Studi Kasus Pemograman C==
Penggunaan Array pada Studi Kasus Pemograman C==Penggunaan Array pada Studi Kasus Pemograman C==
Penggunaan Array pada Studi Kasus Pemograman C==
 
Code
CodeCode
Code
 
Program Kasir c++(case ROti88)
Program Kasir c++(case ROti88)Program Kasir c++(case ROti88)
Program Kasir c++(case ROti88)
 
Latihan C++ menggunakan setConsoleCursorPosition
Latihan C++ menggunakan setConsoleCursorPositionLatihan C++ menggunakan setConsoleCursorPosition
Latihan C++ menggunakan setConsoleCursorPosition
 
MongoUK - PHP Development
MongoUK - PHP DevelopmentMongoUK - PHP Development
MongoUK - PHP Development
 
3 1-1
3 1-13 1-1
3 1-1
 
Modificacion del programa
Modificacion del programaModificacion del programa
Modificacion del programa
 
Metarhia KievJS 22-Feb-2018
Metarhia KievJS 22-Feb-2018Metarhia KievJS 22-Feb-2018
Metarhia KievJS 22-Feb-2018
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
 
Funcd
FuncdFuncd
Funcd
 
Sol8
Sol8Sol8
Sol8
 
completion_proc and history
completion_proc and historycompletion_proc and history
completion_proc and history
 
New
NewNew
New
 
Orm
OrmOrm
Orm
 
Oprerator overloading
Oprerator overloadingOprerator overloading
Oprerator overloading
 
program C++ Atm
program C++ Atmprogram C++ Atm
program C++ Atm
 
Python queue solution with asyncio and kafka
Python queue solution with asyncio and kafkaPython queue solution with asyncio and kafka
Python queue solution with asyncio and kafka
 
Vcs28
Vcs28Vcs28
Vcs28
 

Similar to goto dengan C++

Program membalik kata
Program membalik kataProgram membalik kata
Program membalik katahaqiemisme
 
Computer mai ns project
Computer mai ns projectComputer mai ns project
Computer mai ns projectAayush Mittal
 
Computer mai ns project
Computer mai ns projectComputer mai ns project
Computer mai ns projectAayush Mittal
 
Powerpoint loop examples a
Powerpoint loop examples aPowerpoint loop examples a
Powerpoint loop examples ajaypeebala
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd marchRajeev Sharan
 
ch5_additional.ppt
ch5_additional.pptch5_additional.ppt
ch5_additional.pptLokeshK66
 
54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101premrings
 
Programming - Marla Fuentes
Programming - Marla FuentesProgramming - Marla Fuentes
Programming - Marla Fuentesmfuentessss
 
Assignement of programming & problem solving
Assignement of programming & problem solvingAssignement of programming & problem solving
Assignement of programming & problem solvingSyed Umair
 
Programa Sumar y Multiplicar
Programa Sumar y MultiplicarPrograma Sumar y Multiplicar
Programa Sumar y MultiplicarAnais Rodriguez
 
So I already have most of the code and now I have to1. create an .pdf
So I already have most of the code and now I have to1. create an .pdfSo I already have most of the code and now I have to1. create an .pdf
So I already have most of the code and now I have to1. create an .pdfarjuncollection
 
This what Im suppose to do and this is what I have so far.In thi.pdf
This what Im suppose to do and this is what I have so far.In thi.pdfThis what Im suppose to do and this is what I have so far.In thi.pdf
This what Im suppose to do and this is what I have so far.In thi.pdfkavithaarp
 
RAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAMRAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAMKrishna Raj
 
C++ Programming - 1st Study
C++ Programming - 1st StudyC++ Programming - 1st Study
C++ Programming - 1st StudyChris Ohk
 

Similar to goto dengan C++ (20)

Program membalik kata
Program membalik kataProgram membalik kata
Program membalik kata
 
Penjualan swalayan
Penjualan swalayanPenjualan swalayan
Penjualan swalayan
 
project3
project3project3
project3
 
Computer mai ns project
Computer mai ns projectComputer mai ns project
Computer mai ns project
 
Computer mai ns project
Computer mai ns projectComputer mai ns project
Computer mai ns project
 
Project in programming
Project in programmingProject in programming
Project in programming
 
Powerpoint loop examples a
Powerpoint loop examples aPowerpoint loop examples a
Powerpoint loop examples a
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
ch5_additional.ppt
ch5_additional.pptch5_additional.ppt
ch5_additional.ppt
 
54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101
 
Programming - Marla Fuentes
Programming - Marla FuentesProgramming - Marla Fuentes
Programming - Marla Fuentes
 
Railwaynew
RailwaynewRailwaynew
Railwaynew
 
Ayam potong
Ayam potongAyam potong
Ayam potong
 
Cpp c++ 1
Cpp c++ 1Cpp c++ 1
Cpp c++ 1
 
Assignement of programming & problem solving
Assignement of programming & problem solvingAssignement of programming & problem solving
Assignement of programming & problem solving
 
Programa Sumar y Multiplicar
Programa Sumar y MultiplicarPrograma Sumar y Multiplicar
Programa Sumar y Multiplicar
 
So I already have most of the code and now I have to1. create an .pdf
So I already have most of the code and now I have to1. create an .pdfSo I already have most of the code and now I have to1. create an .pdf
So I already have most of the code and now I have to1. create an .pdf
 
This what Im suppose to do and this is what I have so far.In thi.pdf
This what Im suppose to do and this is what I have so far.In thi.pdfThis what Im suppose to do and this is what I have so far.In thi.pdf
This what Im suppose to do and this is what I have so far.In thi.pdf
 
RAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAMRAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAM
 
C++ Programming - 1st Study
C++ Programming - 1st StudyC++ Programming - 1st Study
C++ Programming - 1st Study
 

Recently uploaded

Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

goto dengan C++

  • 1. #include <iostream> #include <conio.h> #include <windows.h> using namespace std; void gotoxy(int x, int y) { COORD coord; coord.X = x; coord.Y = y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); } int main() { char lagi,nama_kasir[15], ntransaksi[10], kode_susu, jenis_susu[15], kode_kasir[15]; float uang_bayar, jumlah_beli, harga, tharga, jharga, diskon, total_bayar, kembali; ulang: system("cls"); cout<<"-------------------------------------------"<<endl; cout<<"n TOKO SUSU BAYI "<<endl; cout<<"n -MILK COUNTER- "<<endl; cout<<"n==========================================="<<endl; cout<<"Input Nomor Transaksi : ";cin>>ntransaksi; cout<<"Input Kode Kasir [01/02/03] : ";cin>>kode_kasir; cout<<"-------------------------------------------"<<endl; cout<<"Pilih Kode Susu [N/L/B] : ";cin>>kode_susu; cout<<"Input Jumlah Beli : ";cin>>jumlah_beli; cout<<"-------------------------------------------"<<endl; system("cls"); if (kode_susu == 'N'||kode_susu == 'n') { strcpy(jenis_susu,"Nutrilon Baby"); harga=125000; } else if (kode_susu == 'L'||kode_susu == 'l') { strcpy(jenis_susu,"Lactogen Baby"); harga=105000; } else if (kode_susu == 'B'||kode_susu == 'b') { strcpy(jenis_susu,"Morinaga"); harga=135000;
  • 2. } else { system("cls"); gotoxy(20,12); cout<<" ANDA SALAH MEMASUKKAN KODE SUSU "; gotoxy(20,13); cout<<"**** TEKAN ENTER UNTUK MENGULANG *****"; getch(); system("cls"); goto ulang; } if (strcmp(kode_kasir, "01") == 0) { strcpy(nama_kasir,"Budi"); } else if (strcmp(kode_kasir, "02") == 0) { strcpy(nama_kasir,"Slamet"); } else if (strcmp(kode_kasir, "03") == 0) { strcpy(nama_kasir,"Paijo"); } else { system("cls"); gotoxy(20,12); cout<<" ANDA SALAH MEMASUKKAN KODE KASIR "; gotoxy(20,13); cout<<"**** TEKAN ENTER UNTUK MENGULANG *****"; getch(); system("cls"); goto ulang; } cout<<"-------------------------------------------"<<endl; cout<<"n TOKO SUSU BAYI "<<endl; cout<<"n -MILK COUNTER- "<<endl; cout<<"n==========================================="<<endl; cout<<"No. Nota : "<<ntransaksi<<" "<<"Nama Kasir : "<<nama_kasir; cout<<"n-------------------------------------------"<<endl; cout<<"Merk Susu : "<<jenis_susu<<endl; cout<<"Harga : "<<harga<<endl; cout<<"Jumlah Beli : "<<jumlah_beli<<endl; cout<<"n-------------------------------------------"<<endl;
  • 3. tharga=harga*jumlah_beli; diskon=0.05*tharga; jharga=tharga-diskon; cout<<"Jumlah Harga : "<<jharga<<endl; cout<<"Diskon : "<<diskon<<endl; total_bayar=jharga-diskon; cout<<"-------------------------------------------"<<endl; cout<<"Total Bayar : "<<total_bayar<<endl; cout<<"Uang Bayar : ";cin>>uang_bayar; kembali = uang_bayar - total_bayar; cout<<"Kembali : "<<kembali<<endl; cout<<"-------------------------------------------"<<endl; cout<<" Terima kasih Atas Kunjungan Anda "<<endl<<endl; cout<<" Input Data Lagi?[y/t] : ";cin >> lagi; if(lagi=='y'){ goto ulang; } getch(); }