Answer:
- import java.util.Arrays;
- import java.util.Scanner;
-
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- double distances [] = new double[7];
-
- for(int i=0; i < distances.length; i++){
- System.out.print("Input running distance for day " + (i+1) + ": ");
- distances[i] = input.nextDouble();
- }
-
- System.out.println(Arrays.toString(distances));
- }
- }
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).
I dont think it would, but maybe you should Google it just in case.
<span>Dns (domain name system) servers translate all domain names into </span>ip addresses
Roman numerals are V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1,000.
Recall that some numbers are formed by using a kind of subtraction of one Roman “digit”; for example, IV is 4 produced as V minus I, XL is 40, CM is 900, and so on.
A few sample years: MCM is 1900, MCML is 1950, MCMLX is 1960, MCMXL is 1940, MCMLXXXIX is 1989.
(Hints: Use division and mod.)
Assume the year is between 1000 and 3000.