Computer Science, asked by agarwalradhika193, 5 months ago

write the pseudo code to print bill depending depending upon the price and quantity of an item also print bill gst which is the bill after adding5% of tax in the total bill

Answers

Answered by msjayasuriya4
0

Answer:

Program to calculate GST from original and net prices

Given Original cost and Net price then calculate the percentage of GST

Examples:

Input : Netprice = 120, original_cost = 100

Output : GST = 20%

Input : Netprice = 105, original_cost = 100

Output : GST = 5%

Recommended: Please try your approach on {IDE} first, before moving on to the solution.

How to calculate GST

GST ( Goods and Services Tax ) which is included in netprice of product for get GST % first need to calculate GST Amount by subtract original cost from Netprice and then apply

GST % formula = (GST_Amount*100) / original_cost

Netprice = original_cost + GST_Amount

GST_Amount = Netprice – original_cost

GST_Percentage = (GST_Amount * 100)/ original_cost

// CPP Program to compute GST from original

// and net prices.

#include <iostream>

using namespace std;

float Calculate_GST(float org_cost, float N_price)

{

// return value after calculate GST%

return (((N_price - org_cost) * 100) / org_cost);

}

// Driver program to test above functions

int main()

{

float org_cost = 100;

float N_price = 120;

cout << "GST = "

<< Calculate_GST(org_cost, N_price)

<< " % ";

Similar questions