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).
Answer:
In 2000, a basic internet application cost businesses approximately $150,000 per month. In mid-2016, operating the same application in Amazon's cloud cost approximately $1,000 per month.
Explanation:
The role of cloud services cannot be overemphasized. Providing Infrastructure as a service (IaaS), Platform as a service (PaaS) and Software as a service (SaaS) cost a lot as there were very few cloud service providers and most services were yet to be integrated to the cloud.
But as at 2016, the cost on applications dropped as we have experienced an exponential growth in cloud services and applications, we now have Internet of Things (IoT) and other cloud infrastructure.
Answer:
result=0;
for (i=lo ; i<=hi; i++){
result += i;
}
Explanation:
The question says result was declared but not initialized, so using result without initializing it to 0 would throw an error as result would be undefined and you can't add a number to undefined
Another way to do it to keep everything inside the loop would be
for (i=lo ; i<=hi; i++){
if (i==lo) result= 0;
result += i;
}
but this is impractical since it would add unnecesary operations in each cycle of the loop
Answer:
The phrase that describes the best folders in outlook 2016 is:
An organizational container.
Explanation:
The reasons behind this answer are that in the first place the folder allows the user to group emails, contacts, tasks, or even a calendar. So, because this is not only for emails or files. It is an object that can group several types of things and create a new category. Instead of only applying for certain objects. Thus, it is an organizational container. Because the first the third, and the fourth option describe objects that can only group-specific objects instead of all of them. There is no flexibility in the rest of the answers.