Question #343960

Government of Pakistan apply a tax on education sector in which, if your annual fee is greater than 2,00,000 than you have to pay 10% of exceeding amount as tax. If your annual fee is lesser or equal to 2,00,000 than your tax is zero. Write a C++ program in which, read fee of two semesters and identify either user have to pay tax or not. If user have to pay tax than calculate total fee with tax.


Expert's answer

#include <iostream>


int main()
{
	int fee1, fee2;
	std::cout << "Enter 1 semester fee: ";
	std::cin >> fee1;
	std::cout << "Enter 2 semester fee: ";
	std::cin >> fee2;

	int total_fee = fee1 + fee2;
	if (total_fee > 200000)
	{
		std::cout << "Fee with tax: " << total_fee + 0.1*total_fee << std::endl;
	}
	else
	{
		std::cout << "No tax" << std::endl;
	}

	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS