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 of the following is the most reliable way to check the accuracy of a website?
ELEN [110]

Answer:

Examine the sources cited by the website

Explanation:

Due to the ability for everyone to create a website, and that there are no governing standards on the quality of information given on websites, it is important when conducting research to ensure that the sources on the web are up to date, accurate, and provide an objective view

Therefore, it is important to go through and examine the website critically using the the following criteria

1) The website coverage

2) The currency of the website's information

3) Weather the website is objective or not

4) The identity of the author of the website and the ability to contact the author

5) The accuracy of the information contained in the website

3 0
3 years ago
50 points for each person brainless goes to the best answer
wolverine [178]

Technical writing is writing that is done for the purpose of educating, informing or directing someone on how to do something. Technical writing is significantly different than other types of writing such as narrative, because technical writing is intended to impart to the reader some specific skill or ability. Technical writing isn't for everyone. It is often very detail-oriented and usually involves writing within fields where some advanced knowledge is required. When given a technical writing assignment, it also must be approached in a certain way in order for you to be successful. but i would have to go with c- e commerce

6 0
3 years ago
Read 2 more answers
Why do you need to cite your sources? (check all that apply)
Shalnov [3]

the answer to this is  2 and 3

Hope this helped

-scav

4 0
2 years ago
A news website uses 32-bit integers to count the number of times an article has been viewed. The website is becoming more popula
Irina-Kira [14]

Answer:

2^32 times as many values can be represented

Explanation:

32-bit. This means that the number is represented by 32 separate one’s and zero’s. 32 bits of 2 possible states = 2^32=4,294,967,296 possible values.

Integer meaning that only whole multiples of one are accepted.

Signed meaning that negative values are accepted. This halves the number of possible positive values (roughly), so the largest number you can represent is 2^31–1=2,147,483,647, but instead of 0, the smallest number you can represent is -2,147,483,648. An unsigned 32-bit integer, by contrast, can represent anything from 0 to 4,294,967,295.

7 0
2 years ago
Synchronization barriers are a common paradigm in many parallel applications.
Bas_tet [7]

Answer:

I am not sure on this one I am guessing it is True

Explanation:

3 0
2 years ago
Other questions:
  • The main benefit of encryption of a hard drive is to make part of an ROI report.
    15·1 answer
  • Give sally sue specific suggestions on how she can improve her powerpoint skills.
    6·1 answer
  • In general, the farther you are from other road users, the A. lower your crash risk B.higher your crash risk C. slower they are
    6·1 answer
  • A computer byte is the amount of data (measured in bits) that CPU can manipulate at one time/
    8·1 answer
  • To print a budget:________.
    9·1 answer
  • What is the difference between i++ and ++ii?
    6·1 answer
  • Where can a client identify the instant deposit options for their QuickBooks Payments account?
    5·1 answer
  • What kinds of new input devices do you think might be invented in 10, 20, or 50 years? How might those devices change the world?
    9·1 answer
  • Why does my smoke detector keep beeping even after i change the battery?.
    14·1 answer
  • Digital censorship uses automated, intelligent systems with big data storage to _____. Select 3 options.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!