Question

In: Accounting

what is the flowchart in RAPTOR for the following: Write a program that allows a tax...

what is the flowchart in RAPTOR for the following:

Write a program that allows a tax accountant to compute personal income tax. Your program will ask for a filing status (0 for single, 1 for married filing jointly, 2 for married filing separately) and a taxable income. The program will compute the tax. Please use the following chart to find the tax rate to use to compute the tax:  (0) Single: o $0 - $33,950 --> 10% o $33,951 - $171,550 --> 25% o $171,551 + --> 33%  (1) Married Filing Jointly: o $0 - $67,900 --> 10% o $67,901 - $208,850 --> 25% o $208,850 + --> 33%  (2) Married Filing Separately: o $0 - $38,950 --> 10% o $38,951 - $104,425 --> 25% o $104,426 + --> 33% The program should run and allow for as many entries as the tax accountant wants to enter. It will process the personal income tax for each person as well as calculate the average income tax for all the individuals entered. The program

Solutions

Expert Solution

copy to code:

#include <iostream>

using namespace std;

int main()

{

int filingStatus=0;

float totalIncomeTax=0;

float currentTax=0;

float totalRecord=0;

do{

cout<<"\nPlease enter filing status"<<endl;

cout<<"Enter 0 for single"<<endl;

cout<<"Enter 1 for married filing jointly"<<endl;

cout<<"Enter 2 for married filing separately"<<endl;

cout<<"Enter -1 to exit"<<endl;

cin>>filingStatus;

if(filingStatus==0 || filingStatus==1 ||filingStatus==2){

cout<<"Enter the taxable income :";

float income;

cin>>income;

currentTax = 0;

totalRecord++;

if(filingStatus==0){

if(income>0 && income<=33950){

currentTax = income*10/100;

}else if(income>=33951 && income<=171550){

currentTax = income*25/100;

}else if(income>=171551){

currentTax = income*33/100;

}

}else if(filingStatus==1){

if(income>0 && income<=67900){

currentTax = income*10/100;

}else if(income>=67901 && income<=208850){

currentTax = income*25/100;

}else if(income>=208851){

currentTax = income*33/100;

}

}else if(filingStatus==2){

if(income>0 && income<=38950 ){

currentTax = income*10/100;

}else if(income>=38951 && income<=104425 ){

currentTax = income*25/100;

}else if(income>=104426 ){

currentTax = income*33/100;

}

}

cout<<"For income "<<income<<" tax is "<<currentTax;

totalIncomeTax+=currentTax;

}

}while(filingStatus!=-1);

cout<<"Tota record entered : "<<totalRecord<<endl;

cout<<"Average income tax is "<<totalIncomeTax/totalRecord;

return 0;

}


Related Solutions

Need this program in Raptor. Post the pseudocode and the flowchart please! Brewster’s Used Car, Inc....
Need this program in Raptor. Post the pseudocode and the flowchart please! Brewster’s Used Car, Inc. employs several salespeople. Brewster, the owner of the company, has provided a file named sales.txt that contains the sales records for each salesperson for the past month. Each record in the file contains the following two fields: The salesperson’s ID number, as an integer The amount of a sale, as a real number The records are already sorted by salesperson ID. Design a program...
Using RAPTOR create a program that allows the user to input a list of first names...
Using RAPTOR create a program that allows the user to input a list of first names in on array and last names into a parallel array. Input should be terminated when the user enters a sentinel character. the output should be a list of email address where the address is of the following form: [email protected]
Using RAPTOR Create a flowchart and create the pseudocode for the following question Le Chef Heureux...
Using RAPTOR Create a flowchart and create the pseudocode for the following question Le Chef Heureux Restaurant has 20 tables that can be reserved at 5 p.m., 7 p.m., or 9 p.m. Design a program that accepts reservations for specific tables at specific times; the user enters the number of customers, the table number, and the time. Do not allow more than four guests per table or invalid table numbers or times. If an attempt is made to reserve a...
DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that...
DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in an array and then display the following data: The lowest number in the array. The highest number in the array. The total of the numbers in the array. The average of the numbers in the array. PLEASE AND THANK YOU
PROGRAM MUST BE WRITTEN IN JAVAFX Develop a program flowchart and then write a menu-driven Java...
PROGRAM MUST BE WRITTEN IN JAVAFX Develop a program flowchart and then write a menu-driven Java program that will solve the following problem. The program uses one and two-dimensional arrays to accomplish the tasks specified below. The menu is shown below. Please build a control panel as follows: (Note: the first letter is shown as bold for emphasis and you do not have to make them bold in your program.) Help SetParams FillArray DisplayResults Quit Upon program execution, the screen...
Write a Python program that: Create the algorithm in both flowchart and pseudocode forms for the...
Write a Python program that: Create the algorithm in both flowchart and pseudocode forms for the following requirements: Reads in a series of positive integers,  one number at a time;  and Calculate the product (multiplication) of all the integers less than 25,  and Calculate the sum (addition) of all the integers greater than or equal to 25. Use 0 as a sentinel value, which stops the input loop. [ If the input is 0 that means the end of the input list. ]...
Write in Python and as 2 seperate programs Write a program that allows the user to...
Write in Python and as 2 seperate programs Write a program that allows the user to enter the total rainfall for each of 12 months into a LIST. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest rainfall amounts. Data: January 7.9 inches February 10.1 inches March 3.4 inches April 6.7 inches May 8.9 inches June 9.4 inches July 5.9 inches August 4.1 inches September...
PLEASE DESCING A FLOWCHART IN FLOWGORITHM Test Average and Grade Write a program that asks the...
PLEASE DESCING A FLOWCHART IN FLOWGORITHM Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grade for each the five test score and the average test score. Design the following functions in the program : -calAverge This function should accept five test scores as arguments and return the average of the scores. -determineGrade This function should accept a test score as an argument and return a letter...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart for each of the following problems: a) Obtain three numbers from the keyboard, compute their product and display the result. b) Obtain two numbers from the keyboard, and determine and display which (if either) is the smaller of the two numbers. c) Obtain a series of positive numbers from the keyboard, and determine and display their average (with 4 decimal points). Assume that the...
(Do the algorithm and flowchart) Write a C++ program that reads integer numbers and print it...
(Do the algorithm and flowchart) Write a C++ program that reads integer numbers and print it in horizontal order of the screen
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT