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
BigorU [14]
3 years ago
10

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.
Computers and Technology
1 answer:
Helen [10]3 years ago
4 0

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.

You might be interested in
_ includes websites that encourage interaction and connection among people, businesses, and organizations.
Mnenie [13.5K]
C-Facebook, LinkedIn, Twitter, etc
3 0
3 years ago
You are a domain administrator for a large domain. Recently, you have been asked to make changes to some of the permissions rela
Lisa [10]

Explanation:

Since the Austin OU (organization unit) is a descendant of the Texas OU, it naturally inherits the permissions from its parent/ancestors.

Any restriction (permissions removed) from the Texas OU will be inherited onto the Austin OU.  This is exactly the intended purpose of organizing groups in OU's because all changes will automatically inherited within the OU without having to work down the tree.

This can be confirmed by checking with other cities to see if they too have the same restriction.

The proper way the request should have been done is to apply the changes to the most specific unit possible, be that OU's, groups, etc.

7 0
3 years ago
What is pseudo code?
Aleksandr [31]

Answer:

a notation resembling a simplified programming language, used in program design.

Explanation:

8 0
3 years ago
Read 2 more answers
How do new sources of power assist in the development of inventions?
pentagon [3]
<span>New sources of power assist in the development of inventions since t</span>he new inventions would have been worthless without a reliable source of power energy.
3 0
3 years ago
Which asynchronous electronic community is also known as a forum?
Semmy [17]
What are the choices?
Message Boarding is the asynchronous electronic that is know as a forum.
3 0
3 years ago
Read 2 more answers
Other questions:
  • Your Economics teacher has asked you to create a chart showing how supply and demand affects the price of gasoline. Which applic
    13·2 answers
  • Talking to a friend _____.
    5·2 answers
  • Your boss asks you to work through the weekend to install new software on the applications server that serves up applications to
    15·2 answers
  • Which method of the form passes data without appending the parameters to the url?
    5·1 answer
  • A keyboard is a/an _____. interconnector port packet NAS
    7·1 answer
  • Write a program which capitalize every character after full stopin a given sentence
    11·1 answer
  • Can you awnser this question
    15·1 answer
  • State two function of protein in the body
    8·1 answer
  • What is the value of the variable result after these lines of code are executed?
    11·1 answer
  • What is the best way to improve an online search?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!