Question: Understand the scenario given below and write its C++ program. Hint: Take two values from user gross salary and saving salary, then pass these two

Understand the scenario given below and write its C++ program. Hint: Take two values from user gross salary and saving salary, then pass these two variables through function called calculate(x,y), this function determines the tax amount as per the following criteria: The tax is calculated on the taxable income as per the following slabs Slab # Taxable Income Tax Rate Slab 0 0 - 10,000 0% Slab 1 100,00 200,00 10% on the amount exceeding from 10,000 Slab 2 20,000 500,00 Tax from slab 1 + 30% of the amount exceeding from 200,00 Slab 3 50,000+ Tax from slab 2 + 40% of the amount exceeding from 50,000 So, for example, if a person has 750,00 gross salary and 120,00 saving, his tax will be calculated as under: Calculation of taxable income Since the savings are more than 10,000 the taxable income will be calculated as under: Taxable income = 750,00 + (120,00 100,00) = 770,00 Calculation of Tax Tax from Slab 1 = 10,000 * 10% = 10,00 Tax from Slab 2 = 10,00 (tax from previous slab) + 30,00 * 30% = 10,00 + 60,000 = 70,00 Tax from Slab 3 = 70,00 (tax from previous slab) + 270,00 * 40% = 70,00 + 81,000 = 151,00 Total Tax = 15100

question 2

Define structure for Bank considering the followings: a. Enlist data members. b. Use structure object as an array for banks (UBL, NBL, ABL, and FBL). c. Your program should have following functionalities: Show Balance. Deposit Amount. Withdraw Amount. Transfer Amount. Bank addresses and contact details. d. Use Switch-Case statement. e. Save all the data to the file using file Handling technique. f. Ask user every time to continue the program or not (Y/N).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!