Program to calculate GST from original and net prices | CPP Program to compute GST from original and net prices . ; return value after calculate GST % ; Driver program to test above functions
#include <iostream> NEW_LINE using namespace std ; float Calculate_GST ( float org_cost , float N_price ) { return ( ( ( N_price - org_cost ) * 100 ) / org_cost ) ; } int main ( ) { float org_cost = 100 ; float N_price = 120 ; cout << " GST ▁ = ▁ " << Calculate_GST ( org_cost , N_price ) << " ▁ % ▁ " ; return 0 ; }