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-filesDeepak Singh
 
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methodsjwjablonski
 
Coding with Vim
Coding with VimCoding with Vim
Coding with VimEnzo Wang
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyYasuharu 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
 
Exp 6.3 d-422 (2)
Exp 6.3 d-422  (2)Exp 6.3 d-422  (2)
Exp 6.3 d-422 (2)Omkar Rane
 
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, GeneratorsBrainhub
 

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 .pdfarjuncollection
 
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.pdfseoagam1
 
ch6_additional.ppt
ch6_additional.pptch6_additional.ppt
ch6_additional.pptLokeshK66
 
Assignment#1
Assignment#1Assignment#1
Assignment#1NA000000
 
Laporan pd kelompok 6
Laporan pd kelompok 6Laporan pd kelompok 6
Laporan pd kelompok 6phoe3
 
Programming - Marla Fuentes
Programming - Marla FuentesProgramming - Marla Fuentes
Programming - Marla Fuentesmfuentessss
 
Powerpoint loop examples a
Powerpoint loop examples aPowerpoint loop examples a
Powerpoint loop examples ajaypeebala
 
#includeiostream.h#includestdlib.hstruct customers{.docx
#includeiostream.h#includestdlib.hstruct customers{.docx#includeiostream.h#includestdlib.hstruct customers{.docx
#includeiostream.h#includestdlib.hstruct customers{.docxkatherncarlyle
 
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==Sita Anggraeni
 
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 JobyGrejoJoby1
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical fileMitul Patel
 
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.pptxssuser3cbb4c
 

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

Menghitung Luas Bangunan dengan C++
Menghitung Luas Bangunan dengan C++Menghitung Luas Bangunan dengan C++
Menghitung Luas Bangunan dengan C++Achmad Sidik
 
Latihan C++ menggunakan setConsoleCursorPosition
Latihan C++ menggunakan setConsoleCursorPositionLatihan C++ menggunakan setConsoleCursorPosition
Latihan C++ menggunakan setConsoleCursorPositionAchmad Sidik
 
Membuat Aplikasi dengan C++
Membuat Aplikasi dengan C++Membuat Aplikasi dengan C++
Membuat Aplikasi dengan C++Achmad Sidik
 
Program menghitung angka genap dengan C++
Program menghitung angka genap dengan C++Program menghitung angka genap dengan C++
Program menghitung angka genap dengan C++Achmad Sidik
 
CRUD dengan asp classic
CRUD dengan asp classicCRUD dengan asp classic
CRUD dengan asp classicAchmad Sidik
 

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

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-...Steffen Staab
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
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.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
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 WorkerThousandEyes
 
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 CCTVshikhaohhpro
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
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...panagenda
 
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.
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
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.pdfkalichargn70th171
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Recently uploaded (20)

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-...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
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
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
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
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
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...
 
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...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
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
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

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: