WAP to calculate GST
#include<iostream.h>
#include<conio.h>
class calculate_gst
{
float amount;
float totamount;
public:
void calc(float a)
void getd()
{
cin>>amount;
calc(amount);
}
void showd()
{
cout<<"Amount:"<<amount<<<<"\n Discount:"<<d<<"\n GST:"<<gst<<"\n Total amount after tax and discount"<<totamount;
}
};
void calculate_gst::calc(float a)
{
if(a<500)
{
d=3;
gst=8;
}
else if(a<1000)
{
d=5;
gst=16;
}
else if(a<2500)
{
d=8;
gst=28;
}
else if(a>=2500)
{
d=10;
gst=28;
}
totamount=amount+(gst*0.01*amount);
totamount=totamount-(d*0.01*amount);
}
void main()
{
clrscr();
calculate_gst c;
c.getd();
c.showd();
getch();
}
#include<conio.h>
class calculate_gst
{
float amount;
float totamount;
public:
void calc(float a)
void getd()
{
cin>>amount;
calc(amount);
}
void showd()
{
cout<<"Amount:"<<amount<<<<"\n Discount:"<<d<<"\n GST:"<<gst<<"\n Total amount after tax and discount"<<totamount;
}
};
void calculate_gst::calc(float a)
{
if(a<500)
{
d=3;
gst=8;
}
else if(a<1000)
{
d=5;
gst=16;
}
else if(a<2500)
{
d=8;
gst=28;
}
else if(a>=2500)
{
d=10;
gst=28;
}
totamount=amount+(gst*0.01*amount);
totamount=totamount-(d*0.01*amount);
}
void main()
{
clrscr();
calculate_gst c;
c.getd();
c.showd();
getch();
}
Nice post thanks for sharing with us.
ReplyDeleteGST Coaching Center in Chennai | Best Auditor in Chennai | Tax Training Course in Chennai | E-filing Training Classes in Chennai | Tax Training Course in Chennai | Accounting Course in Chennai | GST Registration Consultants in Chennai | GST Practitioner Course in Chennai | GST Certification Course in Chennai | TAX Return Filing Consultants in Chennai | Tax Consultants in Attur