program untuk membuat nota penjualan menggunakan c++
#include <iostream.h>
#include <conio.h>
#include <math>
void main(){
char jw,namabrg[22];
int i=1, tothrg, jml, hrgsat,diskon,totbyr=0,jmlbyr,bayar,kembali;
cout<<” MINI KELONTONG `JADI BARU`”<<endl<<endl;
cout<<”========================================”;
cout<<”========================================”;
gotoxy(2,3+i); cout<<”no|”<<endl;
gotoxy(8,3+i); cout<<”NmaBrg |”<<endl;
gotoxy(20,3+i); cout<<”Jml |”<<endl;
gotoxy(30,3+i); cout<<”Hrg satuan |”<<endl;
gotoxy(47,3+i); cout<<”TotHrg |”<<endl;
gotoxy(58,3+i); cout<<”Diskon |”<<endl;
gotoxy(70,3+i); cout<<”JmlByr”<<endl;
cout<<”========================================”;
#include <conio.h>
#include <math>
void main(){
char jw,namabrg[22];
int i=1, tothrg, jml, hrgsat,diskon,totbyr=0,jmlbyr,bayar,kembali;
cout<<” MINI KELONTONG `JADI BARU`”<<endl<<endl;
cout<<”========================================”;
cout<<”========================================”;
gotoxy(2,3+i); cout<<”no|”<<endl;
gotoxy(8,3+i); cout<<”NmaBrg |”<<endl;
gotoxy(20,3+i); cout<<”Jml |”<<endl;
gotoxy(30,3+i); cout<<”Hrg satuan |”<<endl;
gotoxy(47,3+i); cout<<”TotHrg |”<<endl;
gotoxy(58,3+i); cout<<”Diskon |”<<endl;
gotoxy(70,3+i); cout<<”JmlByr”<<endl;
cout<<”========================================”;
cout<<”========================================”;
do{gotoxy(2,5+i); cout<<i;
gotoxy(4,5+i); cout<<”|”;
gotoxy(6,5+i); cin>>namabrg;
gotoxy(18,5+i); cout<<”|”;
gotoxy(21,5+i); cin>>jml;
gotoxy(25,5+i); cout<<”|”;
gotoxy(28,5+i); cin>>hrgsat;
gotoxy(42,5+i); cout<<”|”;
tothrg=jml*hrgsat;
gotoxy(45,5+i); cout<<tothrg;
gotoxy(55,5+i); cout<<”|”;
gotoxy(58,5+i); cin>>diskon;
diskon=tothrg*(diskon*0.01);
gotoxy(58,5+i); cout<<diskon;
gotoxy(66,5+i); cout<<”|”;
jmlbyr=tothrg-diskon;
gotoxy(70,5+i); cout<<jmlbyr;
gotoxy(1,7+i);cout<<”================================================================================”;
gotoxy(1,6+i);clreol();
gotoxy(60,8+i);cout<<totbyr;
totbyr=totbyr+jmlbyr;
gotoxy(60,8+i);cout<<”Totbyr : “<<totbyr;
i++;
gotoxy(2,14+i);cout<<”tambah data:”;cin>>jw;
gotoxy(2,14+i);clreol();
}while(jw==’y');
gotoxy(61,9+i);cout<<”Bayar :”;
gotoxy(70,9+i); cin>>bayar;
kembali=bayar-totbyr ;
gotoxy(59,11+i);cout<<”Kembali : “<<kembali;
getch();
}
}
0 komentar:
Posting Komentar