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
Mnenie [13.5K]
2 years ago
5

You are tasked with creating a mileage calculator to calculate the amount of money that should be paid to employees. The mileage

is computed as follows An amount of .25 for each mile up to 100 miles An amount of .15 for every mile above 100. So 115 miles would be (.25 * 100) + (.15 * 15) This can all be coded using a mathematical solution but I want you to use an if / else statement. Here is how you are to implement it: If the total miles input is less than or equal to 100 then simply calculate the miles * .25 and output the amount otherwise compute the total amount for all miles mathematically. Input: Total number of miles Process: dollar amount owed for miles driven Output: Amount of money due * Please note that you should simply do calculations within the if and else statements. This mean no cin or cout within if or else. Do it afterward.
Computers and Technology
1 answer:
Vlada [557]2 years ago
3 0

Answer:

Desired C++ Program with proper comment is given below

Explanation:

#include<iostream>

using namespace std;

//main function

int main()

{

  int totalMiles = 0;

  int remainingMiles = 0;

  double amt = 0;

 

  //taking input from user regarind total miles

  cout<<"Enter the total miles: "<<endl;

  cin>>totalMiles;

  //if-else condition to do the calculation

  if(totalMiles<=100)

  {

      amt = totalMiles*.25;

  }

  else

  {

      remainingMiles = totalMiles - 100;

      amt = 100*.25 + remainingMiles*.15;      

  }

 

  cout<<"The total amount is: "<<amt<<endl;

}

You might be interested in
Which statements describe the use of styles in Word? Check all that apply.
algol [13]

Answer:

can be used to make word docments look the same

Explanation:

4 0
3 years ago
Read 2 more answers
In order to prevent unauthorized access, how can the shadow file be configured to enforce a password policy?​ What happens to ac
NemiM [27]

Answer : The securtiy of the password can be maitained by the shadow files such as:-

  • max is for the days that represent that the same password can be used without the need for changing it  
  • min is for the days that represent waiting days before the changing of password after he/she gets a new password
  • warn are the days that come with Waring sign that the password is going to expire soon.

For a certain period of time , the user can access the log in when the password has expired . If that period is timed out then there will be no log in option and the account gets disabled.

4 0
2 years ago
ISDN stands for Internet Services Dynamic Network True/False
aev [14]

The answer is the second option "false." ISDN does not stand for Internet Services Dynamic Network it stands for Integrated Services Digital Network. ISDN is the international communication center for sending data, video, and voice over telephone wires.

Hope this helps.

7 0
3 years ago
Mental state shift involves what?
Delvig [45]

Answer:

It involves a matter involving doubt, uncertainty, or difficulty that may be solved, problem ... getting into a frame of mind to be creative and solve problems.

Explanation:

Hope i am marked as brainliest answer

5 0
3 years ago
What group actively creates technology recommendation for the web?
xxMikexx [17]

The NETP provides actionable recommendations to implement technology and conduct research and development successfully that can advance the effective use of technology to support learning and teaching.


Hope this helps :)



6 0
3 years ago
Read 2 more answers
Other questions:
  • A _____ is a predefined text format that includes multiple formatting options.
    14·1 answer
  • On computer X, a nonpipelined instruction execution would require 12 ns. A pipelined implementation uses 6 equal-length stages o
    9·1 answer
  • The part of the computer that contains the brain, or the central processing unit, also knows as the
    5·1 answer
  • You are holding a rock tied to a string, which is an example of a pendulum. identify and explain the proper term for each part o
    10·2 answers
  • Microcomputers, different from those giant mainframes and supercomputers, are designed for individuals. In fact, the microcomput
    7·1 answer
  • Jenny is working on a laptop computer and notices that the computer is not running very fast. She looks and realizes that the la
    14·1 answer
  • Vannevar Bush imagined a desktop computing machine that would allow people to access data stored in various information centers
    13·1 answer
  • Which element of a presentation program’s interface displays the slide you are currently creating or editing?
    14·2 answers
  • Desktop and personal computer are also known as​
    7·1 answer
  • How to connect two routers wirelessly to extend range.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!