===========================================================================
CODING
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char a[5],b[5],c[5];
int na,nb,nc,pa,pb,pc,t,tt,gst;
cout<<"\nBilling Counter:- \n Enter name of first product: ";
cin>>a;
cout<<"\n ¯Enter price: ";
cin>>pa;
cout<<"\n ¯Enter number of units: ";
cin>>na;
cout<<"\n Enter name of second product: ";
cin>>b;
cout<<"\n ¯Enter price: ";
cin>>pb;
cout<<"\n ¯Enter number of units: ";
cin>>nb;
cout<<"\n Enter name of third product: ";
cin>>c;
cout<<"\n ¯Enter price: ";
cin>>pc;
cout<<"\n ¯Enter number of units: ";
cin>>nc;
pa=pa*na;
pb=pb*nb;
pc=pc*nc;
t=pa+pb+pc;
gst=0.05*t;
tt=t+gst;
cout<<"\n------------------------------------";
cout<<"\n| S.NO. | Item Name | Qty. | Price |";
cout<<"\n| 1 | "<<a<<" | "<<na<<" | "<<pa<<" |";
cout<<"\n| 2 | "<<b<<" | "<<nb<<" | "<<pb<<" |";
cout<<"\n| 3 | "<<c<<" | "<<nc<<" | "<<pc<<" |";
cout<<"\n|----------------------------------|";
cout<<"\n| Total: "<<t<<" |";
cout<<"\n|----------------------------------|";
cout<<"\n| GST: "<<gst<<" |";
cout<<"\n|----------------------------------|";
cout<<"\n| Bill: "<<tt<<" |";
cout<<"\n|----------------------------------|";
cout<<"\n| Thanks For Visit!! |";
cout<<"\n------------------------------------";
getch();
}
CODING
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char a[5],b[5],c[5];
int na,nb,nc,pa,pb,pc,t,tt,gst;
cout<<"\nBilling Counter:- \n Enter name of first product: ";
cin>>a;
cout<<"\n ¯Enter price: ";
cin>>pa;
cout<<"\n ¯Enter number of units: ";
cin>>na;
cout<<"\n Enter name of second product: ";
cin>>b;
cout<<"\n ¯Enter price: ";
cin>>pb;
cout<<"\n ¯Enter number of units: ";
cin>>nb;
cout<<"\n Enter name of third product: ";
cin>>c;
cout<<"\n ¯Enter price: ";
cin>>pc;
cout<<"\n ¯Enter number of units: ";
cin>>nc;
pa=pa*na;
pb=pb*nb;
pc=pc*nc;
t=pa+pb+pc;
gst=0.05*t;
tt=t+gst;
cout<<"\n------------------------------------";
cout<<"\n| S.NO. | Item Name | Qty. | Price |";
cout<<"\n| 1 | "<<a<<" | "<<na<<" | "<<pa<<" |";
cout<<"\n| 2 | "<<b<<" | "<<nb<<" | "<<pb<<" |";
cout<<"\n| 3 | "<<c<<" | "<<nc<<" | "<<pc<<" |";
cout<<"\n|----------------------------------|";
cout<<"\n| Total: "<<t<<" |";
cout<<"\n|----------------------------------|";
cout<<"\n| GST: "<<gst<<" |";
cout<<"\n|----------------------------------|";
cout<<"\n| Bill: "<<tt<<" |";
cout<<"\n|----------------------------------|";
cout<<"\n| Thanks For Visit!! |";
cout<<"\n------------------------------------";
getch();
}
===========================================================================
No comments:
Post a Comment