#include int main() { float amount = 0; printf("Enter the amount in Lacs "); scanf("%f",&amount); int amountInt = amount; printf("Integer part of amount : %d \n ",amountInt); float tax = 0; switch(amountInt) { case 0 : { break; } case 1 : { break; } case 2 : { } case 3 : { } case 4 : { tax = 0.1 * (amount - 2.0); break; } case 5 : { } case 6 : { } case 7 : { } case 8 : { } case 9 : { tax = 0.1 * 3 + 0.2 * (amount - 5); break; } default : { tax = 0.1 *3 + 0.2 * 5 + 0.3 * (amount -10); break; } } printf(" Tax to be paid for Rs%.02f lacs is Rs%.03f lacs\n ",amount,tax); return 0; }