SlideShare a Scribd company logo
1 of 2
Latihan ::: Program Kasir dengan C++
#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
main()
{
char nama[10],*jenis[10],kopiz[10][10],lagi;
inta,b,qty[10],no;
longinttotbay,kembali,harga[10],bayar,sub[10];
atas: clrscr();
cout<<"tttDeliveryRotiBakar18"<<endl;
cout<<"=********************************************************************="<<endl;
cout<<"No.Pesan : ";
cin>>no;
cout<<"Nama Customer : ";
cin>>nama; cout<<"BanyakPesanan : ";
cin>>b;
for(a=1;a<=b;++a) { cout<<"nPesananKe "<<a<<endl;
cout<<"Kode RotiBakar[CK/CC/PC] : ";
cin>>kopiz[a];cout<<"JumlahPesan : ";
cin>>qty[a];
if(strcmp(kopiz[a],"CK")==0||strcmp(kopiz[a],"ck")==0) {jenis[a]="CoklatKacang";
harga[a]=55000;
} else if(strcmp(kopiz[a],"CC")==0||strcmp(kopiz[a],"cc")==0) {jenis[a]="CoklatCheese";
harga[a]=60000;
} else if(strcmp(kopiz[a],"PC")==0||strcmp(kopiz[a],"pc")==0) {jenis[a]="PisangCoklat";
harga[a]=45000;} else
{cout<<"Salah!!,InputKode Lagi!!"<<endl;
goto atas;
} } clrscr();
cout<<" tttBukti PemesananRotiBakar18 "<<endl;
cout<<" ttt DeliveryRotiBakar18 "<<endl;
cout<<"=*********************************************************************="<<endl;
cout<<" No.Pesan : "<<no<<endl;
cout<<" Nama Pemesan :"<<nama<<endl;
cout<<"======================================================================"<<endl;
cout<<" No. Jenis Harga Jumlah Subtotal "<<endl;
cout<<" Roti Roti Pesan "<<endl;
cout<<"======================================================================"<<endl;
totbay=0;
for(a=1;a<=b;++a) {
gotoxy(1,a+10);
cout<<a; gotoxy(5,a+10);
cout<<jenis[a];
gotoxy(25,a+10);
cout<<harga[a];
gotoxy(39,a+10);
cout<<qty[a];
sub[a]=harga[a]*qty[a];
gotoxy(51,a+10);
cout<<sub[a];
totbay=totbay+sub[a];
cout<<endl;
}
cout<<"n====================================================================n"<<endl;
cout<<" Total Bayar :Rp. "<<totbay<<endl;
cout<<" Uang Bayar :Rp. ";
cin>>bayar;
kembali=bayar-totbay;
cout<<" Uang Kembali :Rp. "<<kembali<<endl;
cout<<"n====================================================================n"<<endl;
cout<<"Inputdata lagi [Y]/[T]?:";
cin>>lagi;
if(lagi=='Y'||lagi=='y') gotoatas;
else cout<<"nnttt==TE R I M A K A S I H =="; }
Input:
Ouput:

More Related Content

What's hot

Chapter21 separate-header-and-implementation-files
Chapter21 separate-header-and-implementation-filesChapter21 separate-header-and-implementation-files
Chapter21 separate-header-and-implementation-files
Deepak Singh
 
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methods
jwjablonski
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
Yasuharu Nakano
 
Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"
EPAM Systems
 
Data structure programs in c++
Data structure programs in c++Data structure programs in c++
Data structure programs in c++
mmirfan
 

What's hot (20)

Chapter21 separate-header-and-implementation-files
Chapter21 separate-header-and-implementation-filesChapter21 separate-header-and-implementation-files
Chapter21 separate-header-and-implementation-files
 
Rumus VB-2
Rumus VB-2Rumus VB-2
Rumus VB-2
 
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methods
 
Inc decsourcefile
Inc decsourcefileInc decsourcefile
Inc decsourcefile
 
For loop square
For loop squareFor loop square
For loop square
 
Code
CodeCode
Code
 
Introduction to Go for Java Programmers
Introduction to Go for Java ProgrammersIntroduction to Go for Java Programmers
Introduction to Go for Java Programmers
 
Tic tac toe
Tic tac toeTic tac toe
Tic tac toe
 
Tugas
TugasTugas
Tugas
 
Coding with Vim
Coding with VimCoding with Vim
Coding with Vim
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
 
Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"Владимир Мигуро "Дао Node.js"
Владимир Мигуро "Дао Node.js"
 
Finch + Finagle OAuth2
Finch + Finagle OAuth2Finch + Finagle OAuth2
Finch + Finagle OAuth2
 
Solidity
SoliditySolidity
Solidity
 
timingExercise
timingExercisetimingExercise
timingExercise
 
サイ本 文
サイ本 文サイ本 文
サイ本 文
 
Data structure programs in c++
Data structure programs in c++Data structure programs in c++
Data structure programs in c++
 
Exp 6.3 d-422 (2)
Exp 6.3 d-422  (2)Exp 6.3 d-422  (2)
Exp 6.3 d-422 (2)
 
All you need to know about Callbacks, Promises, Generators
All you need to know about Callbacks, Promises, GeneratorsAll you need to know about Callbacks, Promises, Generators
All you need to know about Callbacks, Promises, Generators
 
MFC Cosinus
MFC CosinusMFC Cosinus
MFC Cosinus
 

Similar to Program Kasir c++(case ROti88)

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
arjuncollection
 
Please use the code below and make it operate as one program- Notating.pdf
Please use the code below and make it operate as one program- Notating.pdfPlease use the code below and make it operate as one program- Notating.pdf
Please use the code below and make it operate as one program- Notating.pdf
seoagam1
 
ch6_additional.ppt
ch6_additional.pptch6_additional.ppt
ch6_additional.ppt
LokeshK66
 
Programming - Marla Fuentes
Programming - Marla FuentesProgramming - Marla Fuentes
Programming - Marla Fuentes
mfuentessss
 
Powerpoint loop examples a
Powerpoint loop examples aPowerpoint loop examples a
Powerpoint loop examples a
jaypeebala
 
#includeiostream.h#includestdlib.hstruct customers{.docx
#includeiostream.h#includestdlib.hstruct customers{.docx#includeiostream.h#includestdlib.hstruct customers{.docx
#includeiostream.h#includestdlib.hstruct customers{.docx
katherncarlyle
 
Tugas praktikukm pemrograman c++
Tugas praktikukm  pemrograman c++Tugas praktikukm  pemrograman c++
Tugas praktikukm pemrograman c++
Dendi Riadi
 
C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptxC++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptx
ssuser3cbb4c
 

Similar to Program Kasir c++(case ROti88) (20)

goto dengan C++
goto dengan C++goto dengan C++
goto dengan C++
 
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
 
C++ practical
C++ practicalC++ practical
C++ practical
 
Please use the code below and make it operate as one program- Notating.pdf
Please use the code below and make it operate as one program- Notating.pdfPlease use the code below and make it operate as one program- Notating.pdf
Please use the code below and make it operate as one program- Notating.pdf
 
ch6_additional.ppt
ch6_additional.pptch6_additional.ppt
ch6_additional.ppt
 
Assignment#1
Assignment#1Assignment#1
Assignment#1
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Laporan pd kelompok 6
Laporan pd kelompok 6Laporan pd kelompok 6
Laporan pd kelompok 6
 
Programming - Marla Fuentes
Programming - Marla FuentesProgramming - Marla Fuentes
Programming - Marla Fuentes
 
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
 
C++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLESC++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLES
 
#includeiostream.h#includestdlib.hstruct customers{.docx
#includeiostream.h#includestdlib.hstruct customers{.docx#includeiostream.h#includestdlib.hstruct customers{.docx
#includeiostream.h#includestdlib.hstruct customers{.docx
 
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==
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical file
 
Tugas praktikukm pemrograman c++
Tugas praktikukm  pemrograman c++Tugas praktikukm  pemrograman c++
Tugas praktikukm pemrograman c++
 
C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptxC++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptx
 
C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
 
C++ assignment
C++ assignmentC++ assignment
C++ assignment
 

More from Achmad Sidik (6)

Menghitung Luas Bangunan dengan C++
Menghitung Luas Bangunan dengan C++Menghitung Luas Bangunan dengan C++
Menghitung Luas Bangunan dengan C++
 
Latihan C++ menggunakan setConsoleCursorPosition
Latihan C++ menggunakan setConsoleCursorPositionLatihan C++ menggunakan setConsoleCursorPosition
Latihan C++ menggunakan setConsoleCursorPosition
 
Membuat Aplikasi dengan C++
Membuat Aplikasi dengan C++Membuat Aplikasi dengan C++
Membuat Aplikasi dengan C++
 
Program menghitung angka genap dengan C++
Program menghitung angka genap dengan C++Program menghitung angka genap dengan C++
Program menghitung angka genap dengan C++
 
CRUD VB2010
CRUD VB2010CRUD VB2010
CRUD VB2010
 
CRUD dengan asp classic
CRUD dengan asp classicCRUD dengan asp classic
CRUD dengan asp classic
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 

Program Kasir c++(case ROti88)

  • 1. Latihan ::: Program Kasir dengan C++ #include <iostream.h> #include <conio.h> #include <stdlib.h> #include <string.h> main() { char nama[10],*jenis[10],kopiz[10][10],lagi; inta,b,qty[10],no; longinttotbay,kembali,harga[10],bayar,sub[10]; atas: clrscr(); cout<<"tttDeliveryRotiBakar18"<<endl; cout<<"=********************************************************************="<<endl; cout<<"No.Pesan : "; cin>>no; cout<<"Nama Customer : "; cin>>nama; cout<<"BanyakPesanan : "; cin>>b; for(a=1;a<=b;++a) { cout<<"nPesananKe "<<a<<endl; cout<<"Kode RotiBakar[CK/CC/PC] : "; cin>>kopiz[a];cout<<"JumlahPesan : "; cin>>qty[a]; if(strcmp(kopiz[a],"CK")==0||strcmp(kopiz[a],"ck")==0) {jenis[a]="CoklatKacang"; harga[a]=55000; } else if(strcmp(kopiz[a],"CC")==0||strcmp(kopiz[a],"cc")==0) {jenis[a]="CoklatCheese"; harga[a]=60000; } else if(strcmp(kopiz[a],"PC")==0||strcmp(kopiz[a],"pc")==0) {jenis[a]="PisangCoklat"; harga[a]=45000;} else {cout<<"Salah!!,InputKode Lagi!!"<<endl; goto atas; } } clrscr(); cout<<" tttBukti PemesananRotiBakar18 "<<endl; cout<<" ttt DeliveryRotiBakar18 "<<endl; cout<<"=*********************************************************************="<<endl; cout<<" No.Pesan : "<<no<<endl; cout<<" Nama Pemesan :"<<nama<<endl; cout<<"======================================================================"<<endl; cout<<" No. Jenis Harga Jumlah Subtotal "<<endl; cout<<" Roti Roti Pesan "<<endl; cout<<"======================================================================"<<endl; totbay=0; for(a=1;a<=b;++a) { gotoxy(1,a+10); cout<<a; gotoxy(5,a+10); cout<<jenis[a]; gotoxy(25,a+10);
  • 2. cout<<harga[a]; gotoxy(39,a+10); cout<<qty[a]; sub[a]=harga[a]*qty[a]; gotoxy(51,a+10); cout<<sub[a]; totbay=totbay+sub[a]; cout<<endl; } cout<<"n====================================================================n"<<endl; cout<<" Total Bayar :Rp. "<<totbay<<endl; cout<<" Uang Bayar :Rp. "; cin>>bayar; kembali=bayar-totbay; cout<<" Uang Kembali :Rp. "<<kembali<<endl; cout<<"n====================================================================n"<<endl; cout<<"Inputdata lagi [Y]/[T]?:"; cin>>lagi; if(lagi=='Y'||lagi=='y') gotoatas; else cout<<"nnttt==TE R I M A K A S I H =="; } Input: Ouput: