1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aleksklad [387]
3 years ago
13

IN C++, write a program may execute the same computations repeatedly.The program below repeatedly asks the user to enter an annu

al salary, stopping when the user enters 0 or less. For each annual salary, the program determines the tax rate and computes the tax to pay.
1. Run the program below with annual salaries of 40000, 90000, and then 0.
2. Modify the program to use a while loop inside the given while loop. The new inner loop should repeatedly ask the user to enter a salary deduction, stopping when the user enters a 0 or less. The deductions are summed and then subtracted from the annual income, giving an adjusted gross income. The tax rate is then calculated from the adjusted gross income.
3. Run the program with the following input: 40000, 7000, 2000, 0, and 0. Note that the 7000 and 2000 are deductions.

Computers and Technology
1 answer:
Fofino [41]3 years ago
6 0

Answer:

Check the explanation

Explanation:

c++ Program to find Gross salary after deducting tax from the annual salary

In this program user have to enter the annual salary,tax rate.This program continue to run repeatedly untill user gives 0 for annual salary.

#include <iostream>

using namespace std;

int main()

  {

      double asal,taxPay,trate;

      char c;

      while(true)

      {

  cout <<"Enter The Annual Salary ::";

      cin>> asal;

          if(asal<=0)

      {

          cout<<"* Program Exit *";

          break;

      }

      cout<<"\nEnter Tax Rate::";

      cin>>trate;

 

      taxPay=asal*(trate/100);

      cout<<"\nTax You Have to pay::"<<taxPay<<endl;

 

        }

}

_____________________

Kindly check the first attached image below for the code output.

2) Modified the above program

#include <iostream>

using namespace std;

int main()

  {

      double asal,taxPay,trate,deduction;

      char c;

      while(true)

      {

  cout <<"\nEnter The Annual Salary ::";

      cin>> asal;

          if(asal<=0)

      {

          cout<<"* Program Exit *";

          break;

      }

      while(true)

      {

          cout<<"Enter Salary Deductions::";

          cin>>deduction;

          if(deduction<=0)

          {

          break;

          }else

          {

              asal=asal-deduction;

          }

         

      }

      cout<<"\nEnter Tax Rate::";

      cin>>trate;

 

      taxPay=asal*(trate/100);

      cout<<"\nTax You Have to pay::"<<taxPay<<endl;

      cout<<"Salary remaining after all deductions::"<<asal;

      }

  return 0;  

  }

Kindly check the second attached image below for the code output.

You might be interested in
What is output by the following?<br><br>print (type("95"))
statuscvo [17]

Answer:

The output is "<class 'str'> ".

Explanation:

In the given python code a print() function is defined. Inside this function, a type() function will use, in which a numeric value is passed in the double quotes (" ") as a function parameter. Double quotes are normally used for print value as a message but in this code, value is not printed because we use the type() function.

  • The type() function Returns the parameter class type of the argument(object).
  • This function is used for debugging. In this function, we pass a single parameter that will return the type of given object.
6 0
3 years ago
Typically , how do people earn income
natima [27]
People earn income by getting jobs and working. When they work, they get paid. That's an income
3 0
4 years ago
Read 2 more answers
Smartphones use ________ technology, allowing users to perform several functions with one device. group of answer choices embedd
12345 [234]

Smartphones use <u>convergence or integration</u> technology, allowing users to perform several functions with one device.

<h3>What are smartphones?</h3>

Smartphones can be defined as hybrid versions of mobile devices that are designed and developed to have more features, so as to enable them run different software applications, functions and perform tasks with the aid of software applications such as web browsers, multimedia player, etc.

<h3>Types of smartphones.</h3>

In Computer technology, there are three popular types of mobile devices and these include the following:

  • Handheld computers
  • Personal digital assistants (PDAs)
  • Smartphones.

In Computer technology, smartphones are designed and developed to use <u>convergence or integration</u> technology by combining previously unrelated technologies together, in order to allow end users perform several functions with one device.

Read more on smart phones here: brainly.com/question/15867542

#SPJ1

8 0
2 years ago
The Event Viewer(Microsoft windows) or console(apple Mac OS x) is used for what purpose?​
iragen [17]

Answer:

it is used to view incidents recorded in the Application, Security, and System logs

Explanation: pls make my answer brainliest

7 0
3 years ago
explain the impact of effectively understanding the various formatting options available in the word processing software applica
Vera_Pavlovna [14]

The formatting tool is very important. When one effectively understands the various formatting options available in the word processing software application, one can be able to;

  • Make more accessible options for readers through creating and use of headings, highlighting key words or ideas etc.

  • Formatting any document helps one to have a  presentable and professional document.

  • It makes the document easier and a lot interesting to read.

  • It helps in Proper punctuation marks and spelling usefulness.

<h3>What is formatting in MS Word?</h3>

Formatting text is simply known as the act of controlling how one wants a particular text to appears in your document. This includes the control of the size, color, etc.

Learn more about word processing software  from

brainly.com/question/1022352

8 0
2 years ago
Other questions:
  • Consider the clipping of a line segment in two dimensions against a rectangular clipping window. Show that you require only the
    10·1 answer
  • Select the term below which is a protocol that provides a method for software components to communicate, interact, and share dat
    6·1 answer
  • Define critical thinking, and list the mental activities involved in critical thinking.
    8·2 answers
  • A program called a ( n ) ____ translates instructions written in high-level languages into machine code.
    13·1 answer
  • What are the OSHA construction standards also called ?
    10·1 answer
  • . Write a C++ Code to get a multiline statement Str1 from a user with a ‘$’ as return character (Hint:
    6·1 answer
  • Just help :(((((((((((((((((((((((((((((((((((
    14·1 answer
  • Please list 15 safety rules that you think should be practiced in the Computer Technology classroom/lab.
    12·1 answer
  • Custodial workers that access the terminal area must have a fingerprint background check done and training unless they are escor
    15·1 answer
  • What is the following file format called? inv_nbr, inv_name, inv_cost 876521,battery,45.00
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!