Knowee
Questions
Features
Study Tools

Which branch in this code is tested by the input 40000 s?cin >> income;cin >> marital_status;if (marital_status == "s") // Condition 1{ if (income <= 30000) // Condition 2 tax = 0.10 * income; // Branch 1 else tax = 3000 + 0.25 * (income - 30000); // Branch 2}else{ if (income <= 60000) // Condition 3 tax = 0.10 * income; // Branch 3 else tax = 6000 + 0.25 * (income - 60000); // Branch 4}Select one:a.Branch 1b.Branch 2c.Branch 3d.Branch 4

Question

Which branch in this code is tested by the input 40000 s?cin >> income;cin >> marital_status;if (marital_status == "s") // Condition 1{ if (income <= 30000) // Condition 2 tax = 0.10 * income; // Branch 1 else tax = 3000 + 0.25 * (income - 30000); // Branch 2}else{ if (income <= 60000) // Condition 3 tax = 0.10 * income; // Branch 3 else tax = 6000 + 0.25 * (income - 60000); // Branch 4}Select one:a.Branch 1b.Branch 2c.Branch 3d.Branch 4

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The input "40000 s" tests Branch 2 in this code. This is because the marital_status is "s" (Condition 1 is true), and the income is more than 30000 (Condition 2 is false), so the code will execute the else statement under Condition 2, which is Branch 2.

Similar Questions

The second branch outputs "Greater than or equal to 90" when the value of userVal is greater than or equal to 90. Fill in the expression for the first branch that outputs "Less than 90".Ex: If the input is 88, then the output is:Less than 90

Step 3 (3 pts). Calculate tax amount based on exemption and taxable income (see tables below). Tax amount should be stored as a double and rounded to the nearest whole number using round(). Submit for grading to confirm eight tests pass.Ex: If the input is:20000 23 500 1 400Ex: The additional output is:AGI: $20523Deduction: $12000Taxable income: $8523Federal tax: $852Income Tax for Single Filers$0 - $10000 10% of the income$10001 - $40000 $1000 + 12% of the amount over $10000$40001 - $85000 $4600 + 22% of the amount over $40000over $85000 $14500 + 24% of the amount over $85000Income Tax for Married Filers$0 - $20000 10% of the income$20001 - $80000 $2000 + 12% of the amount over $20000over $80000 $9200 + 22% of the amount over $80000

Write a program to calculate the income tax as follows Use the below data to calculate the Income_Tax if(Tax_Income <= 0) # Output : hurray..no income tax Otherwise calculate the Income_Tax as follows if (Gross_Income <= 500000): Income_Tax = (Tax_Income * .1) if (Gross_Income <= 1000000) and (Gross_Income > 500000): Income_Tax = 25000 + ((Gross_Income - 500000)*.2) if (Gross_Income > 1000000): Income_Tax = 75000 + ((Gross_Income - 1000000) *.3) Fill the missing code in the given program to the find income tax. Ded_std, Ded_tot and Tax_Income are already defined the code Sample Input and Output 1: deduction under 80c: 50000 deduction under 80cc: 5000 deduction under HRA: 15000 deduction under Medical: 10000 gross income: 250000 gross income: 250000 total deductions: 230000 income tax: 2000.0 Sample Input and Output 2: deduction under 80c: 5000 deduction under 80cc: 2000 deduction under HRA: 1500 deduction under Medical: 500 gross income: 20000 hurray..no income tax give the programming in python

A person is on tax plan A if their income is greater than $50,000. If lower, they are on tax plan B. Identify the formula that indicates whether a person is on tax plan A or B.Options =IF("B2>50000","TAX PLAN A","TAX PLAN B") =IF(B2>50000,'TAX PLAN A','TAX PLAN B') =IF(B2>50000,TAX PLAN A,TAX PLAN B) =IF(B2>50000,"TAX PLAN A","TAX PLAN B")

Output differs. See highlights below.Input25000 1000 0 1 0Your outputAGI: $26000Deduction: $24000Taxable income: $2000Federal tax: $200Tax due: $200Expected outputAGI: $26000Deduction: $12000Taxable income: $14000Federal tax: $1480Tax due: $1480

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.