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.
#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;
}
Comments
Leave a comment