#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

DOCX
Tugas Program C++
PDF
メディアアートにおけるプログラミング言語Rubyの役割
PDF
JavaSE7 Launch Event: Java7xGroovy
TXT
Problemas de Arreglos en c++
PDF
言語の設計判断
PDF
Oopsprc1c
PDF
MongoDB Oplog入門
Tugas Program C++
メディアアートにおけるプログラミング言語Rubyの役割
JavaSE7 Launch Event: Java7xGroovy
Problemas de Arreglos en c++
言語の設計判断
Oopsprc1c
MongoDB Oplog入門

What's hot (20)

TXT
Litebox
PPT
Penggunaan Array pada Studi Kasus Pemograman C==
DOCX
Program Kasir c++(case ROti88)
PDF
Latihan C++ menggunakan setConsoleCursorPosition
PDF
MongoUK - PHP Development
DOCX
3 1-1
DOCX
Modificacion del programa
PDF
Metarhia KievJS 22-Feb-2018
PPTX
Super Advanced Python –act1
PDF
completion_proc and history
PPTX
Oprerator overloading
DOCX
program C++ Atm
PPTX
Python queue solution with asyncio and kafka
Litebox
Penggunaan Array pada Studi Kasus Pemograman C==
Program Kasir c++(case ROti88)
Latihan C++ menggunakan setConsoleCursorPosition
MongoUK - PHP Development
3 1-1
Modificacion del programa
Metarhia KievJS 22-Feb-2018
Super Advanced Python –act1
completion_proc and history
Oprerator overloading
program C++ Atm
Python queue solution with asyncio and kafka
Ad

Similar to goto dengan C++ (20)

DOCX
Program membalik kata
TXT
Penjualan swalayan
RTF
project3
DOC
Computer mai ns project
DOC
Computer mai ns project
PPTX
Project in programming
PPT
Powerpoint loop examples a
PDF
Rajeev oops 2nd march
PPT
ch5_additional.ppt
PDF
54602399 c-examples-51-to-108-programe-ee01083101
PPTX
Programming - Marla Fuentes
PPTX
Computational Physics Cpp Portiiion.pptx
TXT
Railwaynew
TXT
Ayam potong
PPT
DOCX
Assignement of programming & problem solving
DOCX
Programa Sumar y Multiplicar
PDF
So I already have most of the code and now I have to1. create an .pdf
PDF
This what Im suppose to do and this is what I have so far.In thi.pdf
DOCX
RAILWAY RESERWATION PROJECT PROGRAM
Program membalik kata
Penjualan swalayan
project3
Computer mai ns project
Computer mai ns project
Project in programming
Powerpoint loop examples a
Rajeev oops 2nd march
ch5_additional.ppt
54602399 c-examples-51-to-108-programe-ee01083101
Programming - Marla Fuentes
Computational Physics Cpp Portiiion.pptx
Railwaynew
Ayam potong
Assignement of programming & problem solving
Programa Sumar y Multiplicar
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
RAILWAY RESERWATION PROJECT PROGRAM
Ad

Recently uploaded (20)

PPTX
Computer Software - Technology and Livelihood Education
PDF
Visual explanation of Dijkstra's Algorithm using Python
PDF
MCP Security Tutorial - Beginner to Advanced
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
E-Commerce Website Development Companyin india
PPTX
Trending Python Topics for Data Visualization in 2025
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
CCleaner 6.39.11548 Crack 2025 License Key
DOC
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
PDF
Website Design Services for Small Businesses.pdf
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
PPTX
Full-Stack Developer Courses That Actually Land You Jobs
Computer Software - Technology and Livelihood Education
Visual explanation of Dijkstra's Algorithm using Python
MCP Security Tutorial - Beginner to Advanced
Weekly report ppt - harsh dattuprasad patel.pptx
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
GSA Content Generator Crack (2025 Latest)
E-Commerce Website Development Companyin india
Trending Python Topics for Data Visualization in 2025
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
CCleaner 6.39.11548 Crack 2025 License Key
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
Website Design Services for Small Businesses.pdf
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
CNN LeNet5 Architecture: Neural Networks
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
Salesforce Agentforce AI Implementation.pdf
Topaz Photo AI Crack New Download (Latest 2025)
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
Full-Stack Developer Courses That Actually Land You Jobs

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(); }