Contoh Listing Program C++ Penjualan Barang



#include <vcl.h>
#include <stdio.h>
#include <conio.h>
main()
{
int NB, HS, BB;
float TH, dis, TB;
char nama[50];
printf("\nINPUT DATA");
printf("\nNama Barang:");gets(nama);
printf("Harga Satuan:");scanf("%d",&HS);
printf("Banyak Barang:");scanf("%d",&BB);
TH=HS*BB;
dis=0.10*TH;
TB=TH-dis;
printf("OUTPUT DATA");
printf("\nTotal Harga:%0.2f",TH);
printf("\nDiscont:%0.2f",dis);
printf("\nTotal Bayar:%0.2f",TB);
getch();
}

Previous
Next Post »
Thanks for your comment

Random Posts