ANSWER IN C++ PLEASE!!!!!
Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the gas cost for 20 miles, 75 miles, and 500 miles.

Output each floating-point value with two digits after the decimal point, which can be achieved by executing
cout << fixed << setprecision(2); once before all other cout statements. Note: End with a newline.

Answers

Answer 1

Answer:

#include <iostream>

#include <iomanip>  

using namespace std;

int main()

{

   double mpg, ppg;

   cout << "Enter your car's gas mileage (miles/gallon): ";

   cin >> mpg;

   cout << "Enter the gas price (dollars/gallon): ";

   cin >> ppg;

   cout << fixed << setprecision(2);

   for (int miles : { 20,75,500 }) {

       cout << miles << " miles will cost $" << miles * ppg / mpg << endl;

   }

}

Explanation:

I really like the new for(x:y) construct!

Answer 2

The program, with a car's miles/gallon and gas dollars/gallon (both doubles) as input, is written below.

What is programming?

Writing code to support certain activities in a computer, application, or software program and giving them instructions on how to do is known as computer programming.

#include <iostream>

#include <iomanip>  

using namespace std;

int main()

{

  double mpg, ppg;

  cout << "Enter your car's gas mileage (miles/gallon): ";

  cin >> mpg;

  cout << "Enter the gas price (dollars/gallon): ";

  cin >> ppg;

  cout << fixed << setprecision(2);

  for (int miles : { 20,75,500 }) {

      cout << miles << " miles will cost $" << miles * ppg / mpg << endl;

  }

}

Therefore, the programming codes are written above.

To learn more about programming, refer to the link:

https://brainly.com/question/11023419

#SPJ2


Related Questions

What is part of the third step in troubleshooting a computer problem?
O locating the problem and identifying it
O trying a number of simple fixes initially
O researching ways to solve the problem
O seeking help to solve the problem

Answers

Answer:

locating the problem and identifying it.

There is___fatality rate among vulnerable road users.
A. a lower
B. an equal
c. a greater

Answers

c. a greater i think, because it’s saying there’s a higher chance of dying if your in the road and your vulnerable

Why is https used in every link of a website?

Answers

Answer:

As a request-response protocol, HTTP gives users a way to interact with web resources such as HTML files by transmitting hypertext messages between clients and servers. HTTP clients generally use Transmission Control Protocol (TCP) connections to communicate with servers.

which of the following is not a bus type A. Address bus B. Data bus C. Memory bus D. Control bus ​

Answers

Answer:

Answer is memory bus.

Explanation:

Answer is memory bus.

A car dealership only sells cars that have fewer than 10 000 miles and are 5 years old or less. (i) Write an algorithm that will: • ask the user to enter the number of miles and the age of a car • validate the input to check that only sensible values that are in the given range are entered • output True if valid data has been entered or False if invalid data has been entered.

Answers

Answer:

Algorithm:

ValidateCarData (milesDrives, age)

Start

Prompt the user to enter the number of miles and the age of a car.Get the input from the user.Store the number of drives in the variable named milesDrives and the age of the car in the variable named age.if ( milesDrives < 10000 and age <= 5)

               Display true.

else

              Display false.

Stop

Explanation:

Algorithm: An algorithm is a step-by-step solution to a problem in a finite number of steps.

A car dealer sells only the car that

drives less than 10000 milesand the age of the car is equal to or less than 5 years.

Prompt the user to enter the number of miles and the age of a car.

Validate the user-entered data.

when the user-entered data is valid (car drive fewer than 10000 miles and 5 years or less old)

Display true (user enters the valid data).

else (car drives more than 10000 miles or more than 5 years old)

Display false (user enters the invalid data).

Se le conoce así cuando el analista mismo desarrolla el software necesario para implementar el diseño

Answers

Answer:

Desarrollo de software.

Explanation:

El método clásico de desarrollo de software se denomina modelo en cascada, lo que significa que cada fase de desarrollo del programa debe completarse antes de que comience la siguiente, y que se lleva a cabo un extenso trabajo de especificación antes de que comience el desarrollo real del programa. La especificación es tradicionalmente de arriba hacia abajo y el desarrollo se basa en una programación estructurada, es decir, se formula primero un objetivo final para el proyecto, y luego el programa se divide gradualmente en partes funcionales más pequeñas.

Los métodos más nuevos son ágiles y basados ​​en pruebas. Se basan en el desarrollo gradual de muchas entregas parciales del programa y permiten que las distintas fases de desarrollo se lleven a cabo de forma cíclica o en paralelo. Los clientes y usuarios ganan influencia a lo largo del proceso de desarrollo. El desarrollo y las pruebas de prototipos comienzan lo antes posible, antes de que estén listos todos los detalles de la especificación de requisitos. Las decisiones sobre la especificación de requisitos de las versiones de entrega se toman lo más tarde posible, cuando los usuarios han probado y comprendido lo que realmente quieren y existe un buen conocimiento de las necesidades, posibilidades técnicas y dificultades. Cambia entre el método de arriba hacia abajo (para comenzar desde el propósito y el objetivo) y el método de abajo hacia arriba (para comenzar con lo que ya tiene y puede reutilizar, y comenzar con casos especiales simples pero gradualmente hacer que el programa sea cada vez más general).

Summary

In this lab, you complete a partially written C++ program that includes a function requiring multiple parameters (arguments). The program prompts the user for two numeric values. Both values should be passed to functions named calculateSum(), calculateDifference(), and calculateProduct(). The functions compute the sum of the two values, the difference between the two values, and the product of the two values. Each function should perform the appropriate computation and display the results. The source code file provided for this lab includes the variable declarations and the input statements. Comments are included in the file to help you write the remainder of the program.
Instructions

Write the C++ statements as indicated by the comments.
Execute the program by clicking the Run button at the bottom of the screen.

Grading

When you have completed your program, click the Submit button to record your score.



++// Computation.cpp - This program calculates sum, difference, and product of two values.
// Input: Interactive
// Output: Sum, difference, and product of two values.

#include
#include
void calculateSum(double, double);
void calculateDifference(double, double);
void calculateProduct(double, double);
using namespace std;

int main()
{
double value1;
double value2;

cout << "Enter first numeric value: ";
cin >> value1;
cout << "Enter second numeric value: ";
cin >> value2;

// Call calculateSum

// Call calculateDifference

// Call calculateProduct

Answers

Answer:

The functions are as follows:

void calculateSum(double n1, double n2){

   cout<<n1+n2<<endl; }

void calculateDifference(double n1, double n2){

   cout<<n1-n2<<endl; }

void calculateProduct(double n1, double n2){

   cout<<n1*n2<<endl; }

Call the functions in main using:

calculateSum(value1,value2);

calculateDifference(value1,value2);

calculateProduct(value1,value2);

Explanation:

This defines the calculateSum() function

void calculateSum(double n1, double n2){

This prints the sum

   cout<<n1+n2<<endl; }

This defines the calculateDifference() function

void calculateDifference(double n1, double n2){

This prints the difference

   cout<<n1-n2<<endl; }

This defines the calculateProduct() function

void calculateProduct(double n1, double n2){

This prints the product

   cout<<n1*n2<<endl; }

This calls each of the function

calculateSum(value1,value2);

calculateDifference(value1,value2);

calculateProduct(value1,value2);

See attachment for complete program

______ language is written using 0's and 1's​

Answers

Answer:

Binary language is written using 0's and 1's.

Explanation:

That language of 1's and 0's is called binary. Computers speak in binary because of how they are built.

That language of 1's and 0's is called binary. Computers speak in binary because of how they are built.

why should one avoid noise in the computer room​

Answers

is this a joke bc if so why?
This one not a joke hi it’s monika here

Do not make noise in the computer room.
I love to help

An engineer learns a new security threat mitigation technique. The technique maps an IP address to a non-existent host, and is useful in stopping denial of service attacks. Traffic heading to these IPs can be captured for analysis or discarded. Considering the given strategies, which does this technique relate to? Select all that apply.
A. Black hole
B. Sinkhole
C. Forward proxying
D. Reverse proxying

Answers

A. In network architecture, a black hole drops traffic before it reaches its intended destination, and without alerting the source. A simple example is traffic sent to an IP address that an admin mapped to a non-existent host.
B. A sinkhole is similar to configuring a black hole, and often used interchangeably. With sinkholing however, an admin usually retains some ability to analyze and forward the captured traffic.

The names of the governing body or organizationds that creates rules for information technology and information communication technology

Answers

Answer:

Alliance for Telecommunications Industry Solutions

Explanation:

Alliance for Telecommunications Industry Solutions  is the main body that creates rules for information technology and information communication technology.

This agency create solutions to supports the release of new products and services into the communications marketplace. It also act as an agency that standardizes the  wireless and wireline networks activities. It is accredited by the American National Standards Institute (ANSI).

Which phrases suggest that Bob is a web administrator?
Bob logs in to his computer. He checks his email. He then researches online for a system upgrade of a new machine. He fills his timesheet at
his organization detailing the tasks completed during the week. Later in the day, Bob creates a weekly backup from a remote web server.

Answers

"creates a weekly backup from a remote web server"

This implies that he is the owner of the server since, one, he backs it up every week, and two, he has access to create a backup.

what are network services?​

Answers

Answer: A networking service is a low-level application that enables the network to perform more than basic functions.

Define computer with its prossing meaning​

Answers

Answer:

The computer is a device that accepts information (in the form of digitalized data) and manipulates it for some result based on a program, software, or sequence of instructions on how the data is to be processed. Today's computers have both kinds of programming.

Explanation:

did you mean-Define computer with its processing meaning. °•°

Computer is a device that takes input, processes it and gives us output.

Explain two ways by which the calendar meets or fails to meet the criteria of showing the correct data

Answers

Answer:

The two ways the calendar meets the criteria of showing the correct date are;

1) The calendar can give dates in the 12 months in a year

2) The calendar can show up to the 31 different days in a month

Explanation:

The two ways in which the calendar meets the criteria of showing the correct date are;

1) The number number of long blocks with 4 different months each = Three

Therefore, the total number of months the blocks can hold = 3 × 4 months = 12 months = The number of months in a year

2) The number of faces on each dice = 6 faces

The number of dice = 2 dice

The total number of faces = 12

The number of identical faces = 2 (11th and 22nd of the month)

The number of unique faces = 10

The number of combinations of the dices = ₁₀C₂ = 45

The number of combination of faces required to show = 1 to 31 = 31 combination

Therefore, there are adequate combinations on the dice to show all the dates of month

question no.3 a. Can someone pls help me

Answers

Answer:

A=1

B=1

C=0

X= OR

Explanation:

A is XOR

B is NOT

C is AND

X is OR

Pls answer this
The figure above is a type of thread known as
A. Acme thread B. Buttress thread
C. Square thread D. Vee thread

Answers

Answer:

It looks like an Acme thread.

Explanation:

what part of the meat help you identify the less tender cuts​

Answers

If a muscle gets a lot of exercise in an animal it will be a less tender cut of meat.

Give five examples of top level domain​

Answers

Answer:  .com — Commercial businesses.

.org — Organizations (generally charitable).

.net — Network organizations.

.gov — U.S. government agencies.

.mil — Military.

.edu — Educational facilities, like universities.

Explanation:

ANSWER BELOW.com — Commercial businesses.  .org — Organizations (generally charitable). .net — Network organizations. .gov — U.S. government agencies. .edu — (Educational facilities, like universities.)

Hope this helps!!! :)

Ravi is writing an essay on the impact of the internet on business. Help him classify the scenarios he sees around him as positive and negative effects of the internet on business. He recently bought a second-hand camera online, which he hadn't been able to find in any store. A bookstore down the road shut down because people preferred the cheaper online bookstores. Ravi's sister complains that her boss always knows when she is late, but rarely greets her if their paths cross in office. His friend sells printed T-shirts online, storing them in his basement and promoting them on social media. One of his friend's printed T-shirts got wet and stained in the delivery truck and the buyer wrote a nasty review.

Answers

Answer: See explanation

Explanation:

Based on the options given, the positive effects of the internet on business will be:

• He recently bought a second-hand camera online, which he hadn't been able to find in any store.

• His friend sell printed T-shirts online, storing them in his basement and promoting them on social media.

The negative effects of the internet on business will be:

• A bookstore down the road shut down because people preferred the cheaper online bookstores.

• Ravi's sister complains that her boss always knows when she is late, but rarely greets her if their paths cross in office.

• One of his friend's printed T-shirts got wet and stained in the delivery truck and the buyer wrote a nasty review.

Can you identify one syntax error and one logic error in these lines? How do you think you could avoid making logic errors like the one in this code?

You are creating a program in which the user will input his or her age. The program will calculate the year that the user was born and will then tell the user which decade he or she was born in. Here is part of the code:if year > 1989 and year < 2000 print("You were born in the 1980s")

Answers

Answer:

(a) Syntax Error: Missing colon symbol

(b) Logic Error: The condition is wrong

Explanation:

The programming language is not stated; so, the syntax error may not be correctly identified.

Assume the programming language is Python, then the syntax error is the missing colon symbol at the end of the if statement. This is so because, Python required a colon symbol at the end of every if condition statement.

The logic error is also in the condition.

The condition states that all years later than 1989 but earlier than 2000 are 1980s. This is wrong because only years from 1980 to 1989 (inclusive) are regarded as 1980s.

The output for the following code will be: Pasta (1 mark)
My FavFood=Pasta
print (My FavFood)

Answers

Answer:

The output is "Pasta"

Explanation:

Given

The attached code segment

Required

The output

The first line of the program implies that:

MyFavFood="Pasta"

This means that, the value of the variable MyFavFood is string "Pasta"

Next,

print (MyFavFood)

This prints the value of the variable MyFavFood which is "Pasta"

Hence, the output is "Pasta"

Liam and his team developed a social networking group site for their company. They launched the site, and more than 100 users have already
joined, with the number of users growing each day. Above all else, which critical user requirement must Liam and his team meet?
ОА.
ability to access old messages posted by users
OB.
free access to the site
Ocability to upload user videos
OD.
user privacy and confidentiality issues

Answers

Answer:

D. user privacy and confidentiality issues

Explanation:

Software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications.

There are seven (7) main stages in the creation of a software and these are; planning, analysis, design, development (coding), testing, implementation and execution, and maintenance.

Basically, the two (2) essential privacy concerns in the field of cybersecurity are knowing how personal data are collected and essentially how they're used by the beneficiaries or end users.

Above all else, the critical user requirement Liam and his team must meet is user privacy and confidentiality issues.

Confidentiality refers to the act of sharing an information that is expected to be kept secret, especially between the parties involved. Thus, a confidential information is a secret information that mustn't be shared with the general public.

Below are the possible answer to each question write your answer in the space provided before each number

Answers

Answer:

Please find the complete question in the attached file:

Explanation:

1. primary memory

2. secondary memory

3. dynamic ram

4. HDD

5. SSD

6.Rom

7. video card

8. VRAM

9. random access memory  

10. processor

The diamond shape is used exclusively for
_signs.
A. School crossing
B. Yield
C. Warning
D. Regulatory

Answers

Answer is C. warning signs

The diamond shape is used exclusively for warning signs.

Which sign is a warning sign?

Diamond-shaped signs indicate warnings. Rectangular signs with a longer direction horizontal supply direction information. Pentagons characterize school zones.

The form of a diamond sign stands utilized only for warning signs (For example: cross the road ahead, end/begin divided road, merging traffic, curves, and construction warning signs).

Therefore, the correct answer is option C. Warning.

To learn more about warning signs

https://brainly.com/question/26105318

#SPJ2

The CEO of CorpNet.xyz has hired your firm to obtain some passwords for their company. A senior IT network administrator, Oliver Lennon, is suspected of wrongdoing and suspects he is going to be fired from the company. The problem is that he changed many of the standard passwords known to only the top executives, and now he is the only one that knows them. Your company has completed the legal documents needed to protect you and the company. With the help of a CorpNet.xyz executive, you were allowed into the IT Admin's office after hours. You unplugged the keyboard from the back of the ITAdmin computer and placed a USB keylogger into the USB, then plugged the USB keyboard into the keylogger. After a week, the company executive lets you back into the IT Admin's office after hours again. In this lab, your task is to use the keylogger to recover the changed passwords as follows: Move the keyboard USB connector to a different USB port on ITAdmin. Remove the keylogger from ITAdmin. Move the consultant laptop from the Shelf to the Workspace. Plug the keylogger into the consultant laptop's USB drive. Use the SBK key combination to toggle the USB keylogger from keylogger mode to USB flash drive mode. Open the LOG.txt file and inspect the contents. Find the olennon account's password. Find the Administrator account's password. Answer the questions.

Answers

Answer:

The olennon account's password: See the attached file for this.

The Administrator account's password: 4Lm87Qde

Explanation:

Note: See the attached excel file for the olennon account's password as I was unable to save it here because I was instead getting the following message:

"Oh no! It seems that your answer contains swearwords. You can't add it!"

The olennon account's password and the Administrator account's password can be found as follows:

To see the rear of the computer, click Back from the menu bar above the computer.

Drag the USB Type A connector for the keyboard from the rear of the computer to another USB port on the machine.

Make sure the keyboard is plugged back in.

Expand System Cases on the shelf.

Add the Laptop to the Workspace by dragging it there.

To see the rear of the laptop, click Back from the menu above the laptop.

Drag the keylogger from the computer to the laptop's USB port.

Select Front from the menu above the laptop to see the front of the laptop.

Select Click to display Windows 10 on the laptop.

Toggle between keylogger and flash drive mode by pressing S + B + K.

To control what occurs with detachable drives, select Tap.

To view files, choose Open folder.

To open the file, double-click LOG.txt.

Select Answer Questions in the top right corner.

Respond to the questions.

Choose Score Lab as the option.

Therefore, we have:

The olennon account's password:

The Administrator account's password: 4Lm87Qde

Alt +f4 is a short cut of close a document in MS word /ture /false​

Answers

Answer:

True.

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users to type, format and save text-based documents.

In Computer science, there are specific key combinations (short cut) that avail end users the opportunity to perform specific functions without having to go through a series of step.

For example, when you press the Alt button and function key 4 (F4) at the same time, it would close the current open window.

Hence, Alt + F4 is a short cut key that can be used to close a document in MS word.

When you apply _______ you insert a number slightly above the the line of text

A. Subscript
B. Underlining
C. Superscript
D. Text effects

Answers

Subscript 2020 on the edge

Prompt: Create a program that asks the user continuously the dollar amount of their recent Amazon purchases until they say done. Store those numbers in a list. Afterwards calculate the following:
Total Amount Spent
Maximum amount spent on a single purchase
Minimum amount spent on a single purchase
Number of purchases
Amount of money spent on taxes. (Sales tax in NY is 8.875 percent).

Things to keep in mind:
Input is stored as string so you need to convert to float.
If you or your family use Amazon, try using your own data!

Pls Dont scam me

Answers

Answer:

oh sorry I don't know that but...

Explanation:

Thanks for the points hehe

Which is the default data type of Ms-Access? (i) Memo (ii) Number (iii) Text (iv) Auto number​

Answers

Answer:

(iii) Text

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Hence, a software that enables the organization to centralize data, manage the data efficiently while providing authorized users a significant level of access to the stored data, is called a Data Base Management System (DBMS).

Text is the default data type of Microsoft Access (Ms-Access).

Other Questions
Ajax Lighting manufactures and sells street and parking lot lights, such as those on the Fayetteville trail system. Ajax has the best LED lighting technology in the industry. It is a significant competitive advantage. There are only two other companies in the nation that make competitive products. Growth in this industry is about 2% a year or less. Ajax can enjoy sustained competitive advantage because they are in a _________ market #1 Convert the customary units 93 oz = _______ lbs *Write your answer as a mixed number#2 Convert the customary units 38 pints = _______ qt#3 Convert the customary units 3 mi = _______ ft #4 Jason made 33 bottles of flavored olive oil to give to his class. How many pints of flavored olive oil did Jason make if each bottle holds 8 fluid ounces? a guide will greet you as you disembark from the boat to your the city Why is it important to be aware ofwhat type of environment or situation you are in? The CAPM is a theory of the relationship between risk and return that states that the expected risk premium on any security equals its beta times the market return.a. Trueb. False Which of these is not a mixture?A) SaltB) Cooking oilC) Tea leavesD) Milkty PLZ HELP!!! What mass of [tex]SrF_{2}[/tex] can be prepared from the reaction of 10.0g [tex]Sr(OH)_{2}[/tex] with excess HF? THANK U!! suppose a particular in an area eats rabbits. if hunters kill off all of the those predators, the rabbit population will increase, resulting in more______ among the rabbits for food and space?A. competition B. extinction C. symbiosis D. cooperation Describe three changes attributed to toddlers' brain growth. What is the factored form of x2 4x 5? (x + 5)(x 1) (x + 5)(x + 1) (x 5)(x 1) (x 5)(x + 1) Oliver wants to buy a new TV. The price was $985. When he goes to the store asecond time, he found that price was marked down by 35%. What is the newprice of the TV? A biological anthropologist might study which of the following?Group of answer choicesA. why the Maori perform a traditional dance before rugby games.B. how languages vary over time.C. how chimpanzees use tools to obtain food.D. what plant species people were eating in Indiana 500 years ago. Read the excerpt from "A Quilt of a Country."Once these disparate parts were held together by a common enemy, by the fault lines of world wars and the electrified fence of communism. With the end of the cold war there was the creeping concern that without a focus for hatred and distrust, a sense of national identity would evaporate, that the left side of the hyphenAfrican-American, Mexican-American, Irish-Americanwould overwhelm the right.What is the denotative meaning of fault lines in this excerpt?lines that are drawn when placing blameareas of defense in times of warlong cracks in the surface of the earthbreaks in modern American society Mara's ___ about going into her basement comes from the time she walkedthrough a spiderweb down there. A. Etymology B. Epiphany C. TrepidationD. Metamorphosis FInd the meaning with an examplebannedimmoralimpairingbaildefamation Following is a portion of the regression output for an application relating maintenance expense (dollars per month) to usage (hours per week) for a particular brand of computer terminal. When each data value in one sample is matched with a corresponding data value in another sample, the samples are known as Look at points C and D on the graph:A coordinate plane graph is shown. Point C is at negative 5 comma negative 1. Point D is at 0 comma 3. A segment connects the two points.What is the distance (in units) between points C and D? Round your answer to the nearest hundredth. (4 points) Please help me with 4 Id really appreciate it Sally's parents deposited $15,000 into a college savings account on her third birthday. The account had an interest rate of 9.6% compounded annually. They were hoping that the money would double twice by the time she was 18 years old. Using the rule of 72, t = StartFraction 72 Over r EndFraction will their hopes come true? Help answer correctly please !!!!!!!!!!!!!!!! Will mark Brianliest !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!