SlideShare a Scribd company logo
1 of 4
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
struct
{
char tf[10],nf[10],nm[20];
char kb[10][50],nb[15][50];
floathb[50];
intjb[50];
} rjual;
intx,no,jbt,brs;
floatpb,tpb,dc,jby;
char mad='y';
while(mad=='y')
{
clrscr();
gotoxy(20,1);printf("Nandi Hati Dept.Store");
gotoxy(20,2);printf("Jl.MYaminNo165 Padang");
gotoxy(20,4);printf("Transaksi Penjualan");
gotoxy(20,6);printf("Tanggal : ");gets(rjual.tf);
gotoxy(20,7);printf("NomorFaktur:");gets(rjual.nf);
gotoxy(20,8);printf("Nama : ");gets(rjual.nm);
gotoxy(20,10);printf("JumlahBarangTerjual :");scanf("%i",&jbt);
for(x=1;x<=jbt;x+=1)
{
clrscr();
gotoxy(20,1);printf("Nandi Hati Dept.Store");
gotoxy(20,2);printf("Jl.MYaminNo165 Padang");
gotoxy(20,4);printf("Transaksi Penjualan");
gotoxy(20,6);printf("Tanggal : %s",rjual.tf);
gotoxy(20,7);printf("NomorFaktur:%s",rjual.nf);
gotoxy(20,8);printf("Nama : %s",rjual.nm);
gotoxy(20,10);printf("JumlahBarangTerjual :%i",jbt);
gotoxy(20,12);printf("BarangKe %i",x);fflush(stdin);
gotoxy(20,13);printf("------------");
gotoxy(20,14);printf("KodeBarang : ");gets(rjual.kb[x]);
gotoxy(20,15);printf("NamaBarang : ");gets(rjual.nb[x]);
gotoxy(20,16);printf("HargaBarang : ");scanf("%f",&rjual.hb[x]);
gotoxy(20,17);printf("JumlahBarang: ");scanf("%i",&rjual.jb[x]);
gotoxy(20,19);printf("TekanEnterUntukMelanjutkan");getch();
}
clrscr();
gotoxy(20,1);printf("Nandi Hati Dept.Store");
gotoxy(20,2);printf("Jl.MYaminNo165 Padang");
gotoxy(20,4);printf("Faktur");
gotoxy(20,6);printf("Tanggal : %s",rjual.tf);
gotoxy(20,7);printf("NomorFaktur:%s",rjual.nf);
gotoxy(20,8);printf("Nama : %s",rjual.nm);
/*
56789012345678901234567890123456789012345678901234567890123456789012345678901234
567890
1 2 3 4 5 6 7 */
gotoxy(5,9);printf("------------------------------------------------------------------");
gotoxy(5,10);printf("|No.|Kode | Nama Barang | Harga | Jumlah|Pembayaran|");
gotoxy(5,11);printf("| | Barang | | Barang | Barang | |");
gotoxy(5,12);printf("| | | | Rp. | | |");
gotoxy(5,13);printf("------------------------------------------------------------------");
no=0,brs=14,tpb=0;
for(x=1;x<=jbt;x++)
{
pb=rjual.jb[x]*rjual.hb[x];
tpb=tpb+pb;
no++;
gotoxy( 5,brs);printf("|");gotoxy( 7,brs);printf("%i",no);
gotoxy(10,brs);printf("|");gotoxy(12,brs);printf("%s",rjual.kb[x]);
gotoxy(19,brs);printf("|");gotoxy(21,brs);printf("%s",rjual.nb[x]);
gotoxy(40,brs);printf("|");gotoxy(42,brs);printf("%8.0f",rjual.hb[x]);
gotoxy(49,brs);printf("|");gotoxy(53,brs);printf("%i",rjual.jb[x]);
gotoxy(58,brs);printf("|");gotoxy(60,brs);printf("%10.0f",pb);
gotoxy(70,brs);printf("|");
brs++;
}
if(tpb>500000)
dc=0.15*tpb;
jby=tpb-dc;
gotoxy(5,brs) ;printf("------------------------------------------------------------------");
gotoxy(5,brs+1);printf("| Total PembayaranRp.|%10.0f |",tpb);
gotoxy(5,brs+2);printf("| Discount Rp. |%10.0f |",dc);
gotoxy(5,brs+3);printf("| Jumlahdibayar Rp.|%10.0f |",jby);
gotoxy(5,brs+4);printf("------------------------------------------------------------------");
gotoxy(5,brs+6);printf("MAsihAdaData?y/t");mad=getche();
}

More Related Content

What's hot

What's hot (7)

Algo
AlgoAlgo
Algo
 
Code
CodeCode
Code
 
Front End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSFront End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJS
 
HOTEL MANGEMENT
HOTEL MANGEMENTHOTEL MANGEMENT
HOTEL MANGEMENT
 
サイ本 文
サイ本 文サイ本 文
サイ本 文
 
TypeScript 101
TypeScript 101TypeScript 101
TypeScript 101
 
Real Life Uses of a Program (Tik Tok Toy Game) useing by C Programming
Real Life Uses of a Program (Tik Tok Toy Game) useing by C Programming Real Life Uses of a Program (Tik Tok Toy Game) useing by C Programming
Real Life Uses of a Program (Tik Tok Toy Game) useing by C Programming
 

Viewers also liked (13)

Bab i
Bab iBab i
Bab i
 
Makalah
MakalahMakalah
Makalah
 
IP_Product_Comparison_Guide_rev_April2015 (reduced)
IP_Product_Comparison_Guide_rev_April2015 (reduced)IP_Product_Comparison_Guide_rev_April2015 (reduced)
IP_Product_Comparison_Guide_rev_April2015 (reduced)
 
passive-optical-lan-solutions-brochure
passive-optical-lan-solutions-brochurepassive-optical-lan-solutions-brochure
passive-optical-lan-solutions-brochure
 
Grant_Phoolchund-2015-Practical_Diabetes
Grant_Phoolchund-2015-Practical_DiabetesGrant_Phoolchund-2015-Practical_Diabetes
Grant_Phoolchund-2015-Practical_Diabetes
 
Include
IncludeInclude
Include
 
Cat-6A Solution
Cat-6A SolutionCat-6A Solution
Cat-6A Solution
 
Model Spiral/Spiral Boehm
Model Spiral/Spiral BoehmModel Spiral/Spiral Boehm
Model Spiral/Spiral Boehm
 
Pajak pribadi dan pajak usaha
Pajak pribadi dan pajak usahaPajak pribadi dan pajak usaha
Pajak pribadi dan pajak usaha
 
Sparrows
SparrowsSparrows
Sparrows
 
Letra de cambio
Letra de cambioLetra de cambio
Letra de cambio
 
Rf product guide_magalog_2014_web
Rf product guide_magalog_2014_webRf product guide_magalog_2014_web
Rf product guide_magalog_2014_web
 
Báo cáo thực tập Athena - Xây dựng web tin tức bằng WordPress
Báo cáo thực tập Athena - Xây dựng web tin tức bằng WordPressBáo cáo thực tập Athena - Xây dựng web tin tức bằng WordPress
Báo cáo thực tập Athena - Xây dựng web tin tức bằng WordPress
 

Recently uploaded

Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
nirzagarg
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
home
 
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
amitlee9823
 
B. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdfB. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdf
University of Wisconsin-Milwaukee
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
aroranaina404
 
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
nirzagarg
 
DESIGN THINKING in architecture- Introduction
DESIGN THINKING in architecture- IntroductionDESIGN THINKING in architecture- Introduction
DESIGN THINKING in architecture- Introduction
sivagami49
 
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
amitlee9823
 
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
amitlee9823
 

Recently uploaded (20)

Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
 
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
 
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptx
 
B. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdfB. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdf
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
 
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
 
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
 
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 105, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verified
 
DESIGN THINKING in architecture- Introduction
DESIGN THINKING in architecture- IntroductionDESIGN THINKING in architecture- Introduction
DESIGN THINKING in architecture- Introduction
 
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
 
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
 
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
 
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 

Tugas

  • 1. #include<stdio.h> #include<conio.h> #include<string.h> main() { struct { char tf[10],nf[10],nm[20]; char kb[10][50],nb[15][50]; floathb[50]; intjb[50]; } rjual; intx,no,jbt,brs; floatpb,tpb,dc,jby; char mad='y'; while(mad=='y') { clrscr(); gotoxy(20,1);printf("Nandi Hati Dept.Store"); gotoxy(20,2);printf("Jl.MYaminNo165 Padang"); gotoxy(20,4);printf("Transaksi Penjualan"); gotoxy(20,6);printf("Tanggal : ");gets(rjual.tf); gotoxy(20,7);printf("NomorFaktur:");gets(rjual.nf); gotoxy(20,8);printf("Nama : ");gets(rjual.nm);
  • 2. gotoxy(20,10);printf("JumlahBarangTerjual :");scanf("%i",&jbt); for(x=1;x<=jbt;x+=1) { clrscr(); gotoxy(20,1);printf("Nandi Hati Dept.Store"); gotoxy(20,2);printf("Jl.MYaminNo165 Padang"); gotoxy(20,4);printf("Transaksi Penjualan"); gotoxy(20,6);printf("Tanggal : %s",rjual.tf); gotoxy(20,7);printf("NomorFaktur:%s",rjual.nf); gotoxy(20,8);printf("Nama : %s",rjual.nm); gotoxy(20,10);printf("JumlahBarangTerjual :%i",jbt); gotoxy(20,12);printf("BarangKe %i",x);fflush(stdin); gotoxy(20,13);printf("------------"); gotoxy(20,14);printf("KodeBarang : ");gets(rjual.kb[x]); gotoxy(20,15);printf("NamaBarang : ");gets(rjual.nb[x]); gotoxy(20,16);printf("HargaBarang : ");scanf("%f",&rjual.hb[x]); gotoxy(20,17);printf("JumlahBarang: ");scanf("%i",&rjual.jb[x]); gotoxy(20,19);printf("TekanEnterUntukMelanjutkan");getch(); } clrscr(); gotoxy(20,1);printf("Nandi Hati Dept.Store"); gotoxy(20,2);printf("Jl.MYaminNo165 Padang"); gotoxy(20,4);printf("Faktur"); gotoxy(20,6);printf("Tanggal : %s",rjual.tf); gotoxy(20,7);printf("NomorFaktur:%s",rjual.nf); gotoxy(20,8);printf("Nama : %s",rjual.nm);
  • 3. /* 56789012345678901234567890123456789012345678901234567890123456789012345678901234 567890 1 2 3 4 5 6 7 */ gotoxy(5,9);printf("------------------------------------------------------------------"); gotoxy(5,10);printf("|No.|Kode | Nama Barang | Harga | Jumlah|Pembayaran|"); gotoxy(5,11);printf("| | Barang | | Barang | Barang | |"); gotoxy(5,12);printf("| | | | Rp. | | |"); gotoxy(5,13);printf("------------------------------------------------------------------"); no=0,brs=14,tpb=0; for(x=1;x<=jbt;x++) { pb=rjual.jb[x]*rjual.hb[x]; tpb=tpb+pb; no++; gotoxy( 5,brs);printf("|");gotoxy( 7,brs);printf("%i",no); gotoxy(10,brs);printf("|");gotoxy(12,brs);printf("%s",rjual.kb[x]); gotoxy(19,brs);printf("|");gotoxy(21,brs);printf("%s",rjual.nb[x]); gotoxy(40,brs);printf("|");gotoxy(42,brs);printf("%8.0f",rjual.hb[x]); gotoxy(49,brs);printf("|");gotoxy(53,brs);printf("%i",rjual.jb[x]); gotoxy(58,brs);printf("|");gotoxy(60,brs);printf("%10.0f",pb); gotoxy(70,brs);printf("|"); brs++; } if(tpb>500000)
  • 4. dc=0.15*tpb; jby=tpb-dc; gotoxy(5,brs) ;printf("------------------------------------------------------------------"); gotoxy(5,brs+1);printf("| Total PembayaranRp.|%10.0f |",tpb); gotoxy(5,brs+2);printf("| Discount Rp. |%10.0f |",dc); gotoxy(5,brs+3);printf("| Jumlahdibayar Rp.|%10.0f |",jby); gotoxy(5,brs+4);printf("------------------------------------------------------------------"); gotoxy(5,brs+6);printf("MAsihAdaData?y/t");mad=getche(); }