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
Mila [183]
3 years ago
7

The following algorithm adds all the entries in a square n × n array A. Analyze this algorithm where the work unit is the additi

on operation. sum = 0 for i = 1 to n do for j = 1 to n do sum = sum + A[i, j] end for end for write ("Total of all array elements is", sum)

Computers and Technology
1 answer:
wlad13 [49]3 years ago
6 0

Answer:

T(n)=n(n+1)/2

Explanation:

See the attached picture for detailed explanation.

You might be interested in
How many words fit on a double-spaced page?
sveticcg [70]
It depends on the length of the words.
5 0
3 years ago
The ____ of a variable is the location in memory where it’s value is stored. A. Value B. Address C. Data type D. Number
fomenos

Answer: C. Data type

Explanation:

data types are defined as the data storage format that a variable can store a data to perform a specific operation. Data types are used to define a variable before its use in a program. Size of variable, constant and array are determined by data types.

3 0
3 years ago
What are ways to access Tasks view in Outlook? Check all that apply. Select To-Do List or Task Folder. View daily task lists in
SVETLANKA909090 [29]

Answer:

A. B. D. E.

Explanation:

edg 2021

8 0
3 years ago
Read 2 more answers
Iven an array temps of double s, containing temperature data, compute the average temperature. Store the average in a variable c
ale4655 [162]

Answer:

import java.util.Arrays;

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter length of the array:");

       int len = in.nextInt();

       double [] temps = new double[len];

       double avgTem;

       int k =0;

       double total = 0;

       for( k=0; k<temps.length; k++){

           System.out.println("Enter values for the array");

           temps[k]=in.nextDouble();

       }

       System.out.println("The Arrays contains the following values");

       System.out.println(Arrays.toString(temps));

       // Computing the average of the values

       for(k=0; k<temps.length; k++){

           total = total+temps[k];

       }

       avgTem = total/(temps.length);

       System.out.println("The average Temperature is: "+avgTem);

   }

}

Explanation:

  • Using Java programming language
  • Import the Scanner class to receive user input
  • Prompt User for the length of the Array, receive and store in a variable len;
  • Declare a new double array of size len double [] temps = new double[len];
  • Using a for loop, continually prompt user to enter values into the array
  • Display the values of the array using Java's Arrays.toString method
  • Use another for loop to add up all the elements in the arraay and store in the variable called total
  • Outside the second for loop calculate the average avgTem = total/(temps.length);
  • Display the average temp.
6 0
2 years ago
Explain why cloud computing can be more complex than a traditional approach.
sp2606 [1]

Cloud computing is more complex than traditional approach due to the following reasons.

Explanation:

1.Cost Savings and Total Cost of Ownership. When you move to cloud computing you tend to save money in several ways in comparison to traditional IT, including the reduction of in-house equipment and infrastructure.

2.Dissatisfaction in Traditional IT. Many companies are frustrated with the negatives that come with traditional IT, such as poor data backup, managing and maintaining your own hardware, and lack of disaster recovery options.

3.Time to Value and Ease of Implementation. Since you don’t have to spend time configuring hardware, maintain systems, and patching software, you can invest your resources elsewhere.

4.Access to Emerging Technology. Much like a car, the minute you purchase on-premise hardware and software, it immediately starts to age. You can access the latest and greatest innovations with a cloud provider who has more purchasing power and stays up-to-date with available solutions. Also, as new innovations are released, they become less likely to integrate with legacy solutions that are often inflexible. Instead, cloud-first development is coming to the forefront.

5.Using Hybrid to Optimize your Operations. Some organizations take the use of the cloud even further by using multiple clouds simultaneously, thus giving them even more agility. Workloads are placed where they perform best, and where costs are most efficient.

5 0
3 years ago
Other questions:
  • Jason is creating a web page for his school's basketball team. He just finished creating his storyboard. Which tool should he us
    7·1 answer
  • People who work the total hours for which they get paid have
    7·2 answers
  • List and briefly defined categories of security services.
    8·1 answer
  • The ____ button resets slide placeholders to their default position, size, and text formatting.
    11·1 answer
  • n physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initia
    9·1 answer
  • A single-user database system automatically ensures ____ of the database, because only one transaction is executed at a time.
    13·1 answer
  • Write a function named change() that has an integer parameter and six integers reference parameters named hundreds, fifties, twe
    7·1 answer
  • The words that follow a code number in the cpt manual are called the
    12·1 answer
  • Use the dropdown menus to complete the sentences about Live Preview and the Mini Toolbar Live Preview is a convenient way to see
    15·2 answers
  • _____ provides the best video resolution. *<br><br> VGA<br> HDMI<br> USB<br> DVI
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!