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
A cookie recipe calls for the following ingredients:
Romashka [77]

def cookie_Recipe(recipe):

   

   sugar=(0.03125*recipe)

   butter=(0.02083333333*recipe)

   flour=(0.05729166666*recipe)

   LF1=round(sugar, 2)

   LF2=round(butter,2)

   LF3=round(flour, 2)

   print("You will need:")

   print(LF1, "cups of sugar")

   print(LF2, "cups of butter")

   print(LF3, "cups of flour")

   print("To make", recipe, 'cookies')

recipe=int(input("How many cookies do you want to make?\n"))

cookie_Recipe(recipe)

4 0
3 years ago
​Five elements that can prove the genuineness of a user: what you know, what you have, what you are, what you do, and where you
yuradex [85]

Answer: Authentication factor

Explanation: Authentication factor are the factors that describes about the ingenuity or originality of the user .This is the term that tells about the actuality of user that is getting connected with network by the five elemental question .

The question is regarding the possession, inherency, knowledge/information , identity and location.The answers to these question help in finding the authenticated user.

6 0
3 years ago
Read 2 more answers
Which of the following is true of a traditional systems development environment?​ a. ​ Systems are developed and delivered in an
pshichka [43]

Answer:

c. ​ Many applications require substantial desktop computing power and resources.

Explanation:

From the options given, the correct answer is C.

Traditional system development is the development of computer software for a typical computer system.

The other options is true for web based system development environment.

Option A mention web based framework as traditional development environment and this is not correct.

Option B mention scalability and running on multiple hardware. This is not true for traditional development environment as it is not scalable and it doesn't run on multiple hardware concurrently. So B is not correct.

Option C is correct as Many applications require substantial desktop computing power and resources.

Option D is not correct as traditional system development environment is not the platform for internet based development. Internet-based development treats the traditional systems development environment as the platform, rather than just a communication channel.

6 0
3 years ago
The derivative of <br><img src="https://tex.z-dn.net/?f=ln%20%5C%3A%20%20%7Cx%7C%20" id="TexFormula1" title="ln \: |x| " alt="l
pogonyaev

Answer:

true

Explanation:

the derivative of lnx is 1/x and 1/x is and odd function because x^-1 is raise to a negative odd number

7 0
3 years ago
Read 2 more answers
How to sync songs from desktop to mobile device spotify.
Alisiya [41]

Answer:

The answer is below

Explanation:

In order to sync songs from desktop to mobile device Spotify. This following must be followed:

1. From the Spotify PC app, add Local Files in toe synchronized ed to a phone list.

2. Ensure to log into Spotify on mobile phone on the same WiFi network as PC.

3. Click on the menu button

4. Click on Music.

5. Click on Playlists and access folder with local music files

6. Click on the Available Offline switch at the top.

7. A green arrow is shown to depict successful synchronization.

5 0
3 years ago
Other questions:
  • What would be the best course of action for the scenario below? A user has a large amount of data that she or he needs to store.
    7·1 answer
  • The audience, setting, and type of presentation help determine presentation content. True or False?
    8·1 answer
  • Which color is considerd to be a cool color?
    10·2 answers
  • Consider an unpipelined or single-stage processor design like the one discussed in slide 6 of lecture 17. At the start of a cycl
    10·1 answer
  • Universal Containers (UC) has multi-level account hierarchies that represent departments within their major Accounts. Users are
    13·1 answer
  • What is not true of efs
    11·1 answer
  • What is the value of the variable result after these lines of code are executed?
    11·1 answer
  • If you see these REPORT.
    14·2 answers
  • Expectation on Information Technology Fundamental​
    12·1 answer
  • 8. SQL, Oracle Report, and Visual Basic are all examples under the
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!