Answer to Question #343960 in C++ for Ali

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.


1
Expert's answer
2022-05-23T10:19:30-0400
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS