Question

In: Computer Science

PLEASE DO THIS IN C#.In 1789, Benjamin Franklin is known to have written “Our new Constitution...

PLEASE DO THIS IN C#.In 1789, Benjamin Franklin is known to have written “Our new Constitution is now established, and has an appearance that promises permanency; but in this world nothing can be said to be certain, except death and taxes.” Our federal tax system is a “graduated” tax system which is broken into seven segments. Essentially, the more you make, the higher your tax rate. For 2018, you can find the tax brackets here. Your task is to design (pseudocode) and implement (source code) a program that asks the user for a salary and calculates the federal tax owed. Note, that only the money above a particular tax bracket gets taxed at the higher rate. For example, if someone makes $10,000 a year, the first $9525 gets taxed at 10%. The “excess” above that ($475) gets taxed at 12%. Note: work through at least three (3) examples of this by hand before designing the code. It will save you significant time. Still having problems? Have you talked to a GTA recently? Sample run 1: Enter your salary to the nearest dollar: 2000 Total tax owed is: $200

Solutions

Expert Solution

using System;

public class Test
{
   public static void Main()
   {
       double tax = 0;
      
       Console.WriteLine("Enter your salary to the nearest dollar: ");
       double salary = Convert.ToDouble(Console.ReadLine());
      
       if(salary <= 10000)
       tax = salary*0.1;
       else
      
       tax = salary*0.1 + (salary-10000)*0.12;
      
       Console.WriteLine("Total tax owed is: $"+tax);
      
   }
}

Output:

Enter your salary to the nearest dollar: 2000
Total tax owed is: $200

Do ask if any doubt. Please upvote.


Related Solutions

Need this in C# and also the Pseudocode. Program 4: In 1789, Benjamin Franklin is known...
Need this in C# and also the Pseudocode. Program 4: In 1789, Benjamin Franklin is known to have written “Our new Constitution is now established, and has an appearance that promises permanency; but in this world nothing can be said to be certain, except death and taxes.” Our federal tax system is a “graduated” tax system which is broken into seven segments. Essentially, the more you make, the higher your tax rate. For 2018, you can find the tax brackets...
Do you think Benjamin Strong would have agreed with the words below spoken by Franklin Roosevelt...
Do you think Benjamin Strong would have agreed with the words below spoken by Franklin Roosevelt in 1933? “The world will not long be lulled by the specious fallacy of achieving a temporary and probably artificial stability in foreign exchange on the part of a few large countries ... The sound internal economic situation of a nation is a greater factor in its well-being than the price of its currency.”
Outline how the early settlers in the New World like Benjamin Franklin laid the foundation of...
Outline how the early settlers in the New World like Benjamin Franklin laid the foundation of an American business culture focused on innovation and entrepreneurship. Please, include References. Thank you
C. In 1790 Benjamin Franklin left the equivalent of $4,600 (actually 1,000 British pounds) each to...
C. In 1790 Benjamin Franklin left the equivalent of $4,600 (actually 1,000 British pounds) each to the cities of Philadelphia and Boston. He stipulated that the money be invested and that the principal not be touched for 100 years. If the money had been invested at 4%, compounded yearly, how much would each city have had in 1890?  _____________________ How much if it had been invested at 5%, compounded yearly? __________________ D. A genie popped out of a bottle and offered...
How did the framers of our constitution harmonize majority rule with individual rights? and how do...
How did the framers of our constitution harmonize majority rule with individual rights? and how do we still struggle with this same tension today?
Please use c++ and follow the instruction I have written my own code but somehow I'm...
Please use c++ and follow the instruction I have written my own code but somehow I'm confused during the process I cannot figure out how to finish this lab, I need help. Write a program that allows user to input four floating-points values and then prints the largest. It must use functions max2 (given below) to determine the largest value. Feel free to use additional functions, but you are not required to do so. Hint: main will call max2 three...
Judges, lawyers, politicians, and scholars have long debated theories of how our nation's Constitution should be...
Judges, lawyers, politicians, and scholars have long debated theories of how our nation's Constitution should be understood and applied to the issues of our day. Originalists believe that the Constitution should be understood according to its political meaning. Others see the Constitution as a living document whose meaning evolves over time. Who is right in this argument, and why?
hey I have this program written in c++ and I have a problem with if statement...
hey I have this program written in c++ and I have a problem with if statement {} brackets and I was wondering if someone can fix it. //Name: Group1_QueueImplementation.cpp //made by ibrahem alrefai //programming project one part 4 //group members: Mohammad Bayat, Seungmin Baek,Ibrahem Alrefai #include <iostream> #include<stdlib.h> using namespace std; struct node { string data; struct node* next; }; struct node* front = NULL; struct node* rear = NULL; struct node* temp; void Insert() {     string val;    ...
How do I run a lex program written with C on xcode?
How do I run a lex program written with C on xcode?
Please provide a new answer and please NO hand written assignments. Summarize the role of management...
Please provide a new answer and please NO hand written assignments. Summarize the role of management as it relates to finance in a corporation. In your post, address the following: Indicate the various aspects of finance that management must understand. Describe why a manager needs to understand the characteristics and importance of financial markets including risk and efficiency. Describe why cash flow is more important than sales in a business. Discuss what could happen if management does not fulfill responsibilities...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT