Write a program that declares three one-dimensional arraysnamed miles, gallons, and mpg. Each array should be declared in main() and should becapable of holding ten double-precision numbers. The numbers that should be stored in miles are240.5, 300, 189.6, 310.6, 280.7, 206.9, 199.4, 160.3, 177.4, and 192.3. The numbers should bestored in gallons are 10.3, 15.6, 8.7, 14, 16.3, 15.7, 14.9, 10.7, 8.3, and 8.4.

Answers

Answer 1

Answer:

#include <iostream>

using namespace std;

int main(){

   double miles[10] = {240.5, 300, 189.6, 310.6, 280.7, 206.9, 199.4, 160.3, 177.4, 192.3};

   double gallons[10] = {10.3, 15.6, 8.7, 14, 16.3, 15.7, 14.9, 10.7, 8.3, 8.4};

   double mpg[10];

   for (int i = 0; i < 10; i++){

       mpg[i] = miles[i]/ gallons[i];

       cout << "mpg: " << mpg[i] << endl;

   }

}

Explanation:

The C++ source code declares three arrays miles, gallons and mpg with an array length of 10. The gallons and miles arrays are assigned 10 array items each and they are used to push values to the mpg array in the for loop statement. The result of each item in the mpg array is displayed on the screen.


Related Questions

Benjamin took a photo that focused on certain part of an image while blurring out the rest. What is this effect called?
A.
alternate focus
B.
major focus
C.
minor focus
D.
selective focus

Answers

Answer:

(D) selective focus

Explanation: hope this helps!

Answer:

D. Selective Focus

Explanation:

Photographers commonly use the tilt-shift effect to focus on a certain part of the image while blurring the rest of the photograph. They refer to this as selective focus.

fast guys can u tell its answer
find the count of value from cells a5 through e12

Answers

Answer:

See the bottom status bar of excel, it will show the average, count and sum of values in the selection.

A value chosen by the responder to identify a unique IKE SA is a _________.
A. Initiator SPI
B. Responder SPI
C. Flag
D. Message identifier

Answers

Answer:

Responder SPI

Explanation:

Responder SPI : Cookie of an individual referring to an application from the SA organization, a message from the SA, or a delete from the SA.

User max owns a directory games, containing a text file called ourgames.txt that he shares with users belonging to the group gameplayers. Those users may read and execute this file, but not delete it. They may not add other files to the directory. Others may neither read, write, nor execute anything in games. What would be the appropriate ownerships and permissions for both directory games and the file ourgames.txt look like

Answers

Answer:

The directory games folder: drwxr-x---

ourgames.txt files : -rwxr-x---

Explanation:

The directory games and the ourgames.txt file are owned by max who has read, write and execute permissions for both, where the 'd' in the first column represents the directory. The gameplayers group has read and execute permissions represented by the 'r' and 'x' letters. The other group is the third section with just dashes which means no permission is granted for the file.

g Create a Java program that takes input of a list of integers from the user, stores them into an array and then finally uses the array contents to output the list of integers in reverse. The user's input begins with the number of integers to be stored in the array. For coding simplicity, follow each output integer by a space, including the last one. Assume that the list will always contain fewer than 20 integers.Create a Java program Ex: If the input is: 8 5 2 3 4 10 6 8 9

Answers

Answer:

import java.util.Scanner;

public class Main{

public static void main(String[] args) {

int arraylent;

Scanner input = new Scanner(System.in);

System.out.print("Array Length: ");

 arraylent= input.nextInt();

int[] myarray = new int[arraylent];

for(int i = 0; i<arraylent;i++)

    myarray[i] = input.nextInt();

for(int i = arraylent-1; i>=0;i--)

System.out.println(myarray[i]);

}

}

Explanation:

This declares the length of the array

int arraylent;

This next two lines prompt and get the array length i.e. number of input

System.out.print("Array Length: ");

 arraylent= input.nextInt();

This declares the array as type integer. And the length of the array is gotten from the user input

int[] myarray = new int[arraylent];

This gets the items of the array

for(int i = 0; i<arraylent;i++)

    myarray[i] = input.nextInt();

This reverse and prints the array

for(int i = arraylent-1; i>=0;i--)

System.out.println(myarray[i]);

The material inspection and recieving report the multi-purpose document that serves as evidence of inspection and acceptance, shipping document, receiving document, and contractor invoice is designated as the:________.

Answers

Answer:

DD Form 250

Explanation:

DD Form 250 which is an acronym for Department of Defense Form 250.

It is the Material Inspection and Receiving Report that is used for contracts supplies and services including acquiring noncommercial commodities such as:

1. Acknowledgment of equipment by the Government

2. Contractor's invoice for expense.

3. loading record for hauling and acquiring.

4. Proof of Government Quality assessment.

Hence, in this case, the correct answer is DD Form 250.

Display filters and capture filters can be interchanged because they use the same syntax. A. True B. False

Answers

Answer:

Very True

Explanation:

Describe the general strategy behind deadlock prevention, and give an example of a practical deadlock prevention method.
Multi-programming (or multi-tasking) enables more than a single process to apparently execute simultaneously. How this can be achieved on a uni-processor?]

Answers

Answer:

In multi-programming, you use semaphore constructs to protect shared resources. Your program thread or process will block if you want to claim a semaphore when another thread or process has it claimed.

Generally you need to keep the code scope of the claimed semaphore (a.k.a. the critical section) as small as possible, and also, prevent claiming another semaphore within a given critical section.

What is the thickness of a character’s outline called

Answers

Answer:

actually is answer is font weight

hope it helped!

what stage is the most inner part of the web architecture where data such as, customer names, address, account numbers, and credit card info is the store?

Answers

Never store the card-validation code or value (three- or four-digit number printed on the front or back of a payment card used to validate card-not-present transactions). Never store the personal identification number (PIN) or PIN Block. Be sure to mask PAN whenever it is displayed.

You manage a Windows server that has an attached printer that is used by the Sales department. The sales manager has asked you to restrict access to the printer as follows:Sally needs to connect to a printer, print documents, and pause and resume her own print jobs.Damien needs to pause and resume documents for all users, but does not need to change printer properties.You want to assign the most restrictive permissions that meet the sales manager's requirements. What should you do

Answers

Answer:

Damien would be assign the Manage Documents permission while Sally on the other hand will be assign the permission to print.

Explanation:

Based on the information given in order for me to assign a restrictive permission that will meet the requirements of the sale manager's what I will do is for me to assign the Manage Documents permission to Damien reason been that Damien only needs to stop and resume the documents for all users in which he does not need to change the printer properties and to assign the permission to print to Sally reason been that Sally only needs to connect to a printer and to print documents in which she will then stop and resume her own print jobs.

Course Aggregation Many times, departments are only interested with how students have done in courses relative to a specific major when considering applicants for admission purposes.
For this problem you are given a dictionary where the keys are strings representing student ids and the values are dictionaries where the keys represent a course code and the value represents a grade. Your task is to write a function that given a dictionary of the described format and a prefix for course codes, return a dictionary where each key is a student id and the corresponding value is the average grade of the student only in courses that start with the given prefix.
def course_grader (student_to_grades, course_prefix): ({str, {str, float}}) -> {str, float} I: a dictionary containing the grades of students (as described above) and a course code prefix P: compute and store the average grade of all students only for courses that start with the given course prefix 0: a dictionary of student ids to average grades as described in the Processing step pass

Answers

Answer:

def course_grader(student_to_grades, course_prefix):

   student_grades = dict()

   for key, value in student_to_grades.items():

       grade_score = 0

       for course,grade in value.items():  

           if course_prefix == course:  

               grade_score += grade

                student_grades[key] = grade_score / len(value.keys())

   return student_grades

Explanation:

The course_grader function is a python program that accepts two arguments, the student dictionary and the course prefix. The function returns a dictionary of the student id as the key and the average grade of the student as the value.

Given all of the limitations of MBR, is it still relevant in current day use?

Answers

Explanation:

MBR does have its limitations. For starters, MBR only works with disks up to 2 TB in size. MBR also only supports up to four primary partitions—if you want more, you have to make one of your primary partitions an “extended partition” and create logical partitions inside it.

What does Stand for in web design

Answers

Answer:

g

Explanation:

h

Jorge is sending a message to Thomas but would like a copy sent to his external email address as well. Jorge does not want Thomas to see this copy that was sent.

Which mail field will Jorge use to achieve this goal?

To:
From:
CC:
BCC:

Answers

Answer:  BCC (fourth choice)

=================================================

Explanation:

CC stands for "carbon copy".

BCC stands for "blind carbon copy".

Filling out forms is a tedious process. It's even more tedious when you have to repeat yourself multiple times. Carbon copy paper technology allows you to fill out one form and have those inputted entries be copied to the layers below. In terms of email, a carbon copy (CC) email is just an email sent to more than one person. In the CC line, recipients can see who the other people are in the email chain.

In contrast, a blind carbon copy is where the recipients cannot see who is in the BCC line. This allows Jorge to send the message copy to an external address without Thomas knowing.

Is it important to study information systems

Answers

Answer:

There is massive importance if you want to study information study.

It can help you understand the data, organize, and process the data, using which we can generate and share information.

Explanation:

It largely depends on your interest and requirement, but a better knowledge or clue about information systems may help analyze the data especially if you want to become a data scientist, machine learning, Artificial intelligence or deep learning, etc.

It can help you understand the data, organize, and process the data, using which we can generate and share information.

A great understanding of information systems may exponentially increase the productivity, growth, performance, and profit of the company.

Most Professions get exposed to information Systems no matter what their career objective is, as it may help in having better decision making based on the information they get through data.

So, yes!

There is a massive importance if you want to study information study.

What is the name of the tab that becomes available after you add and select an image in your PowerPoint presentation?
Home
Insert
Picture
View

ASAP PLS

Answers

Answer:

INSERT

Explanation:

INSERT PCIURE

If you are working on doing senior portraits and want a lens that will give you the best shallow depth of field which lens would you choose?
a) 55mm f1.2 (focal length of 55mm, maximum aperture of 1.2)
b) 28-80mm f4.5 (Zoom lens with focal length from 28-80mm, max aperture 4.5)
c) 18mm f5.6
d) 50mm f1.4
45 points and brainliest

Answers

Answer: The answer is C     Hope this helps :)    Please mark Brainliest

Explanation:

Answer:

c) 18mm f5.6

Explanation:

For the best lens that offers the best shallow depth of field, you need to choose the one with the maximum apertature but does not zoom.

Hence choice c) has the maximum aperture and does not zoom.

Hope this helps :)

You need to update your router settings, so you log into the administration panel, Whose Internet protocol (IP) address is 192.168.0.1. which IP version is this?

A-IPv4
B-IPv2
C-IPv6
D-IPv1

Answers

Answer:

D

Explanation:

How can you get access to help? Check all that apply

Answers

Answer:

The answer is "F1"

Explanation:

Please find the complete question in the attachment file.

The F1 key is also known as the function key, which can be used to configure on a device or console key to cause such actions, a form of a soft button, to also be performed by a web browser control parser or software application. The main purpose of the F! key is to open the Help screen for all programs.

Which of the following apertures will give you the shallowest depth of field?
a)2.8
b)5.6
c)11
d)22
e)2
50 points and brainliest

Answers

Answer:

a.2.8

The f-stops work as inverse values, such that a small f/number (say f/2.8) corresponds to a larger or wider aperture size, which results in a shallow depth of field; conversely a large f/number (say f/16) results in a smaller or narrower aperture size and therefore a deeper depth of field.

Why do people want phones so bad??

Answers

To help explain this, take a look at these reasons why kids should have cell phones:

#1 To keep in touch. What happens if you're running late picking your child up from school? ...

#2 To talk to friends. ...

#3 To stay safe. ...

#4 To develop essential skills. ...

#8 To improve their organization. ...

#11 To encourage responsibility.

Because we live in a world full of technology and we use it for almost everything. They made life easier in some ways

For an interview, the most used microphone types are

A. Boom mics, long range mics
B. Strap, studio recording mics
C. Lapel or handheld
D.No mics are needed

Answers

The answer is A; hope this helps you

Analyze the needs of the National Security team and help them articulate its problems, develop solutions to meet its needs, and deliver a recommendation that is aligned with the extant national objectives.

Answers

Answer:

Following are the solution to this question:

Explanation:

The Council's role has been to assist and support the President regarding national security and foreign policies ever since its inception under Truman. This Committee often acts as the primary arm of a President to organize these initiatives between government agencies.

The Leader holds sway over the NSC. Its Secretary Of Defense offers a range of options for the Administration on policy issues. The director of national intelligence helps prepare the administration's foreign travel, among other tasks, and offers context memos and staffing for the administration's discussions and phone interviews involving global leaders.

Safety investments were taken for many years utilizing threat cost-benefit analysis wherein the effect metric has been largely focused on even a risk reduction comparative estimate. To evaluate investment decisions, most aim to conduct similar analyses.

Even so, the potential threat is much harder to measure for high-security installations that potential hazard since the likelihood of an attack is highly uncertain and depends strongly on undefinable psychological factors like deterrence as well as the intensity of enemy goals.

Janet needs to flag a message for follow-up in Outlook. Which option is not a default?

Today
Tomorrow
Next Week
Next Tuesday

Answers

Answer:

Explanation:

Today

Answer:

Next tuesday.

Explanation: Its to specific

If I want to control the aperture and I want the camera to control the shutter speed which setting on the mode dial is most appropriate?
a)AV
b) TV
c) M
d) P
since this is my last question im giving 100 points and brainliest

Answers

Answer:

answer is a

hopes this helps

Suppose a switch is built using a computer work station and that it can forward packets at a rate of 500,000 packets per second, regardless (within limits) of size. Assume the workstation uses direct memory access (DMA) to move data in and out of its main memory, which has a bandwidth of 2 Gbps, and that the I/O bus has a bandwidth of 1 Gbps. At what packet size would the bus bandwidth become the limiting factor

Answers

Answer:

When the transmission exceeds 667 packets

Explanation:

In computer networking, a packet is a chunk of data transmitted across the network. The packet size of an Ethernet network is 1.5kilobytes, while the packet size of an IP packet payload is 64 kilobytes.

A switch is a physical network device that connects nodes or workstations while communicating the packets (or frames). The I/O bus size bandwidth is 1Gbps which allows approximately 667 packets. Once this packet size is crossed, the bus becomes a limiting factor or bottle neck.

Write a recursive function named double_digits that accepts an integer as a parameter and returns the integer obtained by replacing every digit with two of that digit. For example, double_digits(348) should return 334488. The call double_digits(0) should return 0. Calling your function on a negative number should return the negation of calling it on the corresponding positive number; for example, double_digits(-789) should return -778899.

Answers

Answer:

A recursive function known as double-digit is a function that accepts as a parameter and returns the integer that is obtained by changing each digit with double digits. For example 425 should be return as 442255.

In the given scenario

the function will be as follow

If

def double_digits:

n < 0:

return -1 * double_digits ( -1 * n )

elif n = 0

return o

else:

result

double_digits ( n // 10 )

return int ( str ( result ) + str ( n % 10 ) + str ( n % 10 )

Test the function as follow

print ( double_digits ( 348 ) )

Result

334488

Test the function as follow

print ( double_digits ( 0 ) )

Result

0

Test the function as follow

print ( double_digits ( -789 ) )

Result

-778899

Explain to Alana why she might not want to blast her boss on social media just yet.

Answers

Answer: She might get fired. And who knows, if she doesn't, she might get a raise!

As you draw a star, pressing the shift key while you drag increases the number of points on the star. True or false

Answers

Answer:

true

Explanation:

Other Questions
In what aspect the enzyme is different from other catalysts ? help please Q: Which power of Congress helps ensure domestic tranquility?A. Providing a check for executive powerB. Passing laws to guarantee protections under the Bill of RightsC. Resolving disputes between states < ?D. Passing laws to improve the economy what type of figurative language is you are getting on my last nerve Which of the following is an accurate explanation of what this paragraph means? A).Clark thinks that the animals notice the absence of visitors.B).Clark thinks that the animals will get to see her mom soon. C).The goats have more trouble getting along with guests than the cows do.D).The goats have more visitors than the cows that only see Clark's mom. yooo where the fine homies at? please help I need the answer!!! thanks in advance! In photosynthesis, what form of energy is sunlight converted to, and how is thisenergy stored? To rewrite the expression ab+a+b+1, Jozelle first writes (ab+a) + (b+1). What property justifies this? Please help pleaseeee find the slope of the line passing through the following steps of points: (7,-4) and (-3,8) Write four moral duties you perform every day. The creation of a central government and the foundation of the __________ dynasty ended the Warring States period. HELP PLEASE I HAVE BEEN WORKING ALL DAY AND KNOW I AM ON A UNIT TEST PLEASEEEE. :)))) 100 POINTS TO GIVE AWAY Write the correct end marks on the blank lines. Have you ever wondered where your gas money goes ____ The biggest portion goes to the manufacturers of crude oil, the people who get the oil out of the ground ____ They take a whopping 72% ___ The people who refine the crude oil, turning it into gasoline, earn about 9% ___ The distributors, people who move the oil around, make 7% ___ You may wonder who the rest goes ___ Well, taxes account for the other 12% ___ Do you know how much the station owners make ___ They make as little as a few cents A GALLON ___ Shocking, isnt it ___ Question 11 (1 point)Which of the following words is not a cognate?apopularbcuadernoOdcomputadoraguitarra Why did cities begin to develop along the Tigris and EuphratesRivers? 1When he was sick, Tony missedthe class test. x2 + kx + (k + 3) is tangent to x-axis. Find the valueof k. IF YOU HURRY AND GIVE ME THE RIGHT ANSWER I WILL GIVE BRAINLEST TO YOU(The Enlightenment and Revolution: Constitutional versus Absolute Monarchies MC)Which of the following was a result of the English Civil War? (4 points) aMary and William of Orange were offered the throne. bOliver Cromwell took over and ruled as military dictator. cParliament looked for a way to limit the king's powers. dThe king had total power and Parliament never recovered Consider the system of equations.y = 2x + 4,3y + x = 3Which statement is true of this system of equations?Both equations are in slope-intercept form.The first equation converted to slope-intercept form is y + 2x = 4.The second equation converted to slope-intercept form is .y = negative one-third x minus 1Neither equation is in slope-intercept form. Alyssa bought a dress for $52 and 3 pairs of jeans. She paid a total of $125. Write an equation to represent this word problem(PLS ANSWER SERIOUSLY, I WILL GIVE A BRAINLY CROWN TO WHOEVER ANSWERS RIGHT).