#include<iostream>
using namespace std;
//code to calculate bill of 3 things
int main() {
float pencil;
float pen;
float eraser;
cout<<"enter pencil price: ";
cin>>pencil;
cout<<"enter pen price: ";
cin>>pen;
cout<<"enter eraser price: ";
cin>>eraser;
float bill = pencil+pen+eraser;
float gst = bill*0.18; // gst calculation
float gstbill = bill+gst; // final bill after gst
cout<<"total bill (before gst)= "<<bill<<endl;
cout<<"total bill (after gst)= "<<gstbill<<endl;
return 0;
}
No comments:
Post a Comment