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
Amanda [17]
3 years ago
6

Modify the provided code file to create a workout tracking program that lets the user enter (from the console) the distance they

ran each day of the week. Store each value into an array of doubles named distances
Computers and Technology
1 answer:
koban [17]3 years ago
3 0

Answer:

  1. import java.util.Arrays;
  2. import java.util.Scanner;
  3. public class Main {
  4.    public static void main(String[] args) {
  5.        Scanner input = new Scanner(System.in);
  6.        double distances [] = new double[7];
  7.        for(int i=0; i < distances.length; i++){
  8.            System.out.print("Input running distance for day " + (i+1) + ": ");
  9.            distances[i] = input.nextDouble();
  10.        }
  11.        System.out.println(Arrays.toString(distances));
  12.    }
  13. }

Explanation:

The solution code is written in Java.

Firstly, create a Scanner object to get user input for running distance (Line 6). Next, declare a distances array and set the array size to 7 because we intend to use this array to hold running distance for 7 days per week.

Next, use the for loop that run for 7 times to repeatedly prompt user to input running distance for each day and store each value to the array distances (Line 9 -12).

At last, display the array to console terminal (Line 14).

You might be interested in
Which section of a PCM is responsible for sending the proper reference voltage to many of the sensors?
pishuonlain [190]

The section of a PCM that is responsible for sending the proper reference voltage to many of the sensors is the input sensor section.

<h3>What are PCM inputs?</h3>

The Powertrain Control Module (PCM) is known to be an input section of the PCM.

It is made up of the engine's ignition system, fuel injection system and also emission controls. The PCM is known to receives inputs a lot from different kinds  of sensors and switches.

Learn more about sensors from

brainly.com/question/26320121

8 0
3 years ago
What is the main difference between cloud computing and SaaS?
Artemon [7]

The answer is C: Cloud computing is a service, and SaaS is a platform.

Cloud computing and SaaS are closely related terms, but are different. Cloud computing consist of infrastructure and services and can be described as the delivery of computer services like, storage, databases, servers, and more over the internet. On the other hand, SaaS can refer to as a software delivery model licensed differently to on-premise applications and provide users with access to a vendor’s cloud based web applications or software.   


7 0
3 years ago
Cloud kicks recently completed the implementation of sales cloud. Cloud kicks has trained the users to use the mobile app to acc
aleksandrvk [35]

Answer:

see how long the people are on the app and see low long te time is constant where nobody is on at all

Explanation:

7 0
4 years ago
......acts as a platform on which application software runs.
dexar [7]

System software acts as a platform on which an application software program runs. Hope this helps!

8 0
3 years ago
Please help this is important
Lera25 [3.4K]

I think it is false hope this helps

5 0
4 years ago
Other questions:
  • In addition to talking to other doctors remotely, telegraphy technology?
    5·1 answer
  • You turn your computer on and the computer will not boot up where is something you should do to diagnose the problem?
    12·1 answer
  • To hide gridline when you display or print a worksheet
    14·1 answer
  • Which Call of Duty game is the best?
    6·1 answer
  • In a fully underwritten offering a firm sells 1 million shares of stock through a fully underwritten offering. Their banker char
    10·1 answer
  • Who designed analatic engine in the 1930's?​
    10·1 answer
  • When does MMF2 inactivate an Active object? A. When the score is higher than the game's previous high score B. When the player d
    15·1 answer
  • Which new console should i buy Nintendo switch Xbox series x or a ps5
    14·2 answers
  • What does a wireless LAN (WLAN) act as to a wired network?
    12·1 answer
  • Definition of data redundancy​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!