(2) 10') Write a program to calculate the average of all elements in array a. array a should be defined as: int a[10]={21,13,4,35,16,17,8,19,20,7}; ( 2 ) 10 ' ) Write a program to calculate the average of all elements in array a . array a should be defined as : int a [ 10 ] = { 21,13,4,35,16,17,8,19,20,7 } ;​

Answers

Answer 1

Using the code in computational language in C++ it is possible to write a program that organizes the given array defining the elements.

Writing code in C++:

#include <stdio.h>

double Average(int a[], int size) {

   int i, sum=0;

   for (i=0; i<size; i++) {

       sum += a[i];

   }

   return (double)sum / size;

}

int main() {

   int arr[5];

   double avg;

   for (int i=0; i<5; i++) {

       printf("Enter value for %d-th element: ", i+1);

       scanf("%d", &arr[i]);

   }

   avg = Average(arr, 5);

   printf("Average value is %.2lf\n", avg);

   return 0;

}

See more about C++ code at brainly.com/question/19705654

#SPJ1

(2) 10') Write A Program To Calculate The Average Of All Elements In Array A. Array A Should Be Defined

Related Questions


\( \tt{Define \: hardware.}\)

Answers

Answer:

The vital components of a computer system , which can be seen and touched , are called hardware .

examples

keyboard monitormouse

hope it is helpful to you

Answer:

Hardware is the collective term for the internal and external hardware that enables you to carry out key operations including input, output, storage, communication, processing, and more.

___________________

Hope this helps!

Plzzzz help!!!!!!!!!!!!

a sensor that stop a machine if a door is opened is an example of a

a.barrier interlock

b.guard interlock

c.electrical interlock

d.mechanical interlock

Answers

B . Guard interlock is the answer

Answer:

B. Guard interlock

Explanation:

I took a quiz on this earlier

brainiest please

list of functions of control unit​

Answers

Answer:

I guess it would help you

list of functions of control unit

Which of the following parameters is optional sample(a,b,c,d=7

Answers

Parameter D is Optional as it is already assigned to an integer value: 7.

The optional Parameter is D as it is said to be assigned  an integer value of 7.

What are optional parameters?

This is known to be a process  that  is made up of optional choices that one do  not need to push or force so as to pass arguments at their set time.

Note that The optional Parameter is D as it is said to be assigned  an integer value of: 7 because it implies that one can use the call method without pushing the arguments.

Learn more about Parameter from

https://brainly.com/question/13151723

#SPJ2

flodding on rivers is caused by human activity rather than natural events true or false

Answers

Answer:

True

Explanation:

While I believe it's a compendium of the both(both true and false), I when asked to pick just one, I would go with yes. They're are lots of things we humans do on a general note that causes flooding. Although, heavy rainfall can also cause flooding and that's not as a result of human activity, but directly. But then, activities like not maintaining a dam, or erecting a structurally failed dam can cause flood to occur at any point in time, without warning even. Another way is when due to our activities, we block the rivers, this can also lead to flooding exactly like the case of heavy rainfall does. Lack of good drainage facilities, drainage wouldn't create itself, we as humans do. When we don't were essentially creating an excuse for an eventual happening of flood.

Succinctly put, human activities also cause floods, as much as natural events causes flood.

Please post detailed answers to the following questions. Please use complete sentences.

Explain the concepts of GIGO—garbage in, garbage out. Why do you think it’s a helpful concept in coding? How do you think it can be a helpful concept outside of coding?

Answers

Computational mathematics and arithmetic both share the idea of GIGO, which states that the strength of the input determines the quality of the product.

What is a code?

In a certain programming language, a collection of commands or a collection of rules are referred to as computer code. It's also the name given to the source code just after the translator has prepared it for computer execution.

The computer science abbreviation GIGO means that poor input will lead to poor output. Methods must first verify that the input is valid according to best programming practises. One well programme won't create trash since it never accepts in the first place.

Learn more about code, Here:

https://brainly.com/question/497311

#SPJ1

Pitch an idea for an app that would help with sustainability (examples could be recycling, food waste or energy). What features would it have, how would one of these features work and how would it positively impact the user of the app

Answers

you could do something like homeless help, it would be able to find homeless ppl if they signed up and get them a partner to help them with there life

Explanation:

what is a data source in OLE?​

Answers

Answer:

OLE DB Driver for SQL Server uses the term data source for the set of OLE DB interfaces used to establish a link to a data store, such as SQL Server. Creating an instance of the data source object of the provider is the first task of an OLE DB Driver for SQL Server consumer.

Explanation:

hope it helps you and give me a brainliest

Use the drop-down menus to complete statements about how to use the database documenter

options for 2: Home crate external data database tools

options for 3: reports analyze relationships documentation

options for 5: end finish ok run

Use the drop-down menus to complete statements about how to use the database documenteroptions for 2:

Answers

To use the database documenter, follow these steps -

2: Select "Database Tools" from   the dropdown menu.3: Choose "Analyze"   from the dropdown menu.5: Click on   "OK" to run the documenter and generate the desired reports and documentation.

How is this so?

This is the suggested sequence of steps to use the database documenter based on the given options.

By selecting "Database Tools" (2), choosing "Analyze" (3), and clicking on "OK" (5), you can initiate the documenter and generate the desired reports and documentation. Following these steps will help you utilize the database documenter effectively and efficiently.

Learn more about database documenter at:

https://brainly.com/question/31450253

#SPJ1

What is an example of something that can be done through Personal Automation?

Answers

Answer:

For example, at an insurance company, an underwriter could use a personal automation to extract data from third-party systems to assess risk. A relationship manager at an insurance company can set up a personal automation to validate and reconcile data in a customer relationship management (CRM) system.

Write code in java that takes input from the user for the radius (double) of a circle, and create a circle with that radius. The program should then print a sentence with the circumference and area of the circle. You should use the appropriate Circle methods to obtain the circumference and area of the circle rather than calculating these values yourself.

Sample run:

Enter the radius of the circle:
> 3
A circle with a radius 3.0 has a circumference of 18.84955592153876 and an area of 28.274333882308138

Answers

Answer:

Explanation:

import java.util.Scanner;

public class Circumference {

   public static void main(String[] args){

       Scanner input = new Scanner(System.in);

       System.out.print(“Enter the radius of the circle: ");

       double userInput = input.nextDouble();

       //create a new instance of the Circumference Class

       Circumference c = new Circumference();

       System.out.println(“A circle with a radius of “ + userInput + “ has a circumference of ”  + c.getCircumference(userInput) + "and an area of " + c.getArea(userInput);

 }

  public double getCircumference(double radius){

      return 2.0 * Math.PI * radius; //formula for calculating circumference

 }

 public double getArea(double radius){

     return radius * radius * Math.PI; //formula for finding area

 }

}

/* Formatting may be a lil weird in the main method(), if your getting errors just comment the print statement and re-type it yourself :)*/

Which of these is being personified in the following sentence?

1. Morning
2. Sky
3. Children
4. Stars

Answers

I think it's Stars

Why? because its talking about more then one star so thats why its "Stars" not "Star" like the others.

hope it helps :).

Explain the paging concept and main disadvantages of pipelined
approaches? Compare the superscalar and super pipelined approaches
with block diagram?

Answers

Answer:

PAGINACIÓN En la gestión de memoria con intercambio, cuando ... Debido a que es posible separar los módulos, se hace más fácil la modificación de los mismos. ... Ventajas y Desventajas de la segmentación paginada

Explanation:

And office now has a total of 35 employees 11 were added last year the year prior there was a 500% increase in staff how many staff members were in the office before the increase

Answers

There were 5 staff members in the office before the increase.

To find the number of staff members in the office before the increase, we can work backward from the given information.

Let's start with the current total of 35 employees. It is stated that 11 employees were added last year.

Therefore, if we subtract 11 from the current total, we can determine the number of employees before the addition: 35 - 11 = 24.

Moving on to the information about the year prior, it states that there was a 500% increase in staff.

To calculate this, we need to find the original number of employees and then determine what 500% of that number is.

Let's assume the original number of employees before the increase was x.

If we had a 500% increase, it means the number of employees multiplied by 5. So, we can write the equation:

5 * x = 24

Dividing both sides of the equation by 5, we find:

x = 24 / 5 = 4.8

However, the number of employees cannot be a fraction or a decimal, so we round it to the nearest whole number.

Thus, before the increase, there were 5 employees in the office.

For more questions on staff members

https://brainly.com/question/30298095

#SPJ8

Hoda wants to create a new presentation in PowerPoint with existing graphics and designs. What is the easiest and fastest way for her to do this? Use an existing template. Design a new theme for the presentation. Create a custom template for the presentation. Search for a design template online.

Answers

Answer:

The answer is A

Explanation:

Edge 2020

define operating system

Answers

Answer:

the software that supports a computer's basic scheduling tasks.

Answer:

The software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals.

Explanation:

public class ArrayCopy {

public static void main (String[] argv)
{
int[][] A = {
{1},
{2, 1},
{3, 2, 1},
{4, 3, 2, 1},
{5, 4, 3, 2, 1}
};
print (A);

int[][] B = copy (A);
print (B);
}

static void print (int[][] X)
{
for (int i=0; i for (int j=0; j < X[i].length; j++) {
System.out.print (" " + X[i][j]);
}
System.out.println ();
}
}

// INSERT YOUR CODE HERE.

}

Answers

Answer:

To implement the copy method, we need to create a new 2D array with the same dimensions as the input array A, and then copy the values from A into the new array. Here's one way to do it:

static int[][] copy(int[][] A) {

   int[][] B = new int[A.length][];

   for (int i = 0; i < A.length; i++) {

       B[i] = new int[A[i].length];

       for (int j = 0; j < A[i].length; j++) {

           B[i][j] = A[i][j];

       }

   }

   return B;

}

This method creates a new 2D array B with the same number of rows as A. For each row of A, it creates a new array with the same length as that row, and then copies the values from A into the new array. Finally, it returns the new array B.

Here's the complete code with the copy method added:

public class ArrayCopy {

   public static void main (String[] argv) {

       int[][] A = {

           {1},

           {2, 1},

           {3, 2, 1},

           {4, 3, 2, 1},

           {5, 4, 3, 2, 1}

       };

      print (A);

       int[][] B = copy (A);

       print (B);

   }

   static void print (int[][] X) {

       for (int i=0; i<X.length; i++) {

           for (int j=0; j<X[i].length; j++) {

               System.out.print (" " + X[i][j]);

           }

           System.out.println ();

       }

   }

   static int[][] copy(int[][] A) {

       int[][] B = new int[A.length][];

       for (int i = 0; i < A.length; i++) {

           B[i] = new int[A[i].length];

           for (int j = 0; j < A[i].length; j++) {

               B[i][j] = A[i][j];

           }

       }

       return B;

   }

}

Hope this helps!

How To Approach Data Center And Server Room Installation?

Answers

Answer:

SEE BELOW AND GIVE ME BRAINLEST

Explanation:

Make a plan for your space: Determine how much space you will require and how it will be used. Consider power requirements, cooling requirements, and potential growth.

Choose your equipment: Based on your unique requirements, select the appropriate servers, storage devices, switches, routers, and other equipment.

Create your layout: Determine the room layout, including rack placement, cabling, and power distribution.

Set up your equipment: Install the servers, storage devices, switches, and other equipment as planned.

Connect your equipment: Connect and configure your servers and other network devices.

Check your systems: Check your equipment to ensure that everything is operating properly.

Maintain and monitor: To ensure maximum performance, always check your systems for problems and perform routine maintenance.


If you wanted readers to know a document was confidential, you could include a ____ behind the text stating
"confidential".
watermark
theme
text effect
page color

Answers

I have no idea for that

Answer:

watermark

Explanation:

For the project in this course, you have been asked to provide cloud-based device management solution for the Tetra Shillings accounting firm. If you have not begun working through the steps for setting up an Intune tenant and creating a user account in Intune. It is recommended that review the steps in the Project 1 instructions before addressing the topic. Although the CIO and CEO of the company are impressed with what Microsoft Intune can do in terms of improving device deployment and management however, they have concerns about the impact managing users and devices with Intune will have on the way employee accounts are created and managed. It is important to note that when you create a user in Intune the user account is stored Azure Active Directory. There are also worries about cloud security and the ability for users to access the network from anywhere in the world. In the past some of the company's employee have fallen for phishing scams resulting in compromised login credentials.

Based what you have learned about Microsoft Intune and Azure Active Directory discuss options that are available for managing and securing authentication for Tetra Shilling's devices and users.

The CIO of Tetra Shillings has provided the following information about the current environment:

Current Tetra Shillings user accounts are management from the company's on-premises Active Directory.
Tetra Shillings employees sign-in into the company network using their Active Directory username and password.
The company is especially concerned about the following:

Account management. Where will accounts be created and managed?
How will user authentication be impacted? Will users still be able to use their current Active Directory credentials to sign into their devices and still access resources on the local Active Directory network?
Securing authentication in the cloud.
Address the following based on the given information:

Explain how you can implement a Microsoft Intune device management solution and still allow Tetra Shillings employees to use their existing on premises Active Directory credentials to log onto the local network.
What controls and methods are available Azure Active Directory and Intune for controlling access to resources?
What Methods are available in Intune to detect when user accounts get compromised.
What actions can be taken to prevent compromised credentials from being used to access the network.

Answers

Sync user accounts using an on-premises AD integration with Intune. Access can be restricted using Azure AD conditional access restrictions. Use the device compliance policies in Intune to keep an eye.

How can I make Azure AD's device management functional?

Choose Azure Active Directory > Mobility (MDM and MAM) > Microsoft Intune after logging into the Azure portal. Establish the MDM User scope. Indicate which users' devices Microsoft Intune should control. These Windows 10 devices can automatically sign up for Microsoft Intune control.

Which of the following tools enables us to examine Azure prices and offers cost-cutting suggestions?

Azure Advisor and Cost Management collaborate to make suggestions for cost reduction. By locating idle and underutilised resources, Azure Advisor aids in efficiency optimisation.

To know more about user accounts  visit:-

https://brainly.com/question/28847638

#SPJ1

0.6 tenths of an hour would be how many minutes?

Answers

Answer: 3.6 minutes

Explanation:

How many subnets and host per subnet are available from network 192.168.43.0 255.255.255.224?

Answers

It should be noted that the number of subnets and hosts available from network 192.168.43.0 255.255.255.224 is 8 and 32, respectively. Only 30 of the 32 hosts are generally functional.

What is a host in computer networking?

A network host is a computer or other device that is connected to a computer network. A host can serve as a server, supplying network users and other hosts with information resources, services, and applications. Each host is given at least one network address.

A computer network is a group of computers that share resources on or provided by network nodes. To communicate with one another, computers use common communication protocols over digital links.

So, in respect to the above response, bear in mind that we may compute the total number of: by putting the information into an online IPv4 subnet calculator.

8 subnets; and30 hosts available for 192.168.43.0 (IP Address) and 255.255.255.224 (Subnet)

Learn more about hosts:

https://brainly.com/question/14258036

#SPJ1

Create a program that will output the sum of the prime numbers ( 2 - 100). A prime number is a number greater than 1 that cannot be formed by multiplying two smaller natural numbers. some prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37... Example: Find the total sum of prime numbers from 1 - 100 The total sum is 1060. Verify your answers.

Answers

Answer:

The attached file is a C program that does much of what you want.  It does not output the the sum of the primes, but lists the primes.  The output is simple enough to change.  This program builds quite easily with GCC.

I don't know what language you're using, so I'm just providing a piece of code I've written that might help you out.

Also:

There are a few tricks in searching for prime numbers.  Here are some that I always like to take into account.

1) With the exception of 2 and 3, all primes are one away from a multiple of six

2) When testing a number for divisibility, you only have to test up as far as its square root.

3) You don't need to test for divisibility by composite numbers.  Only prime factors are needed. Any composite numbers smaller than x will be multiples of primes smaller than x.

So you can very rapidly find primes with a loop that starts at 6, and goes up to whatever limit you want, incrementing by 6. Let's call the number of  that loop x. You then only have to test if the x - 1 is prime and if x + 1 is prime.  That eliminates 2/3 of the iterations needed. Also, when you find primes, put them in an array.  I would start by creating an array with the numbers 2 and 3 already in it (those being the only two primes that are not adjacent to a multiple of six). Then each number tested only needs to be checked for divisibility by numbers in that array that are less than or equal to the square root of the number being tested.  If the number is composite, then it is only divisible by something larger than its square root if it is also divisible by something smaller than its square root.

With all of this big blurb written, and some hard-to-read C code attached, if you're just looking to write something quick to do your homework, and don't care about it being efficient, you can just do something like this javascript style example:

var n, tally = 0, list = [], isPrime;

for(n = 2; n < 100; n++){

 isPrime = 1;

 for(m = 0; m < list.length && list[m] <= Math.sqrt(n) && isPrime; m++){

   if(n % list[m] == 0) isPrime = 0;

 }

 if(isPrime){

   list[list.length] = n;

   tally += n;

 }

}

console.log('sum of primes: ' + tally);

I haven't run that code, so do watch out for any errors I missed.  Good luck!

Write a method smallestPositive that takes an integer array argument and returns the smallest positive element in the array.

Answers

Answer:

public class Main

{

public static void main(String[] args) {

    int[] arr = {28, 7, -51, -2, 221};

 System.out.println(smallestPositive(arr));

}

public static int smallestPositive(int[] arr){

    int heighest = arr[0];

   

    for(int i=0; i<arr.length; i++){

        if(arr[i] > heighest)

            heighest = arr[i];

    }

   

    int lowest = heighest;

    for(int i=0; i<arr.length; i++){

        if(arr[i] < lowest && arr[i] > 0)

            lowest = arr[i];

    }

   

    return lowest;

}

}

Explanation:

The code is in Java.

Create a method named smallestPositive that takes one parameter, arr

Inside the method:

Find the largest value in the array using the first for loop

Set the this value as lowest to find the smallest positive value (I assumed there is at least on positive value in the array)

Create another for loop to iterate through the array. If a value is smaller than the lowest and if it is greater than 0, set it as lowest

When the loop is done, return the lowest

Inside the main method:

Initialize an array with some numbers

Call the smallestPositive() with this array and print the result

(In our example, the result would be 7)

The
tests the ability of a networking technician to install,
maintain, troubleshoot, and support a network, and understand various aspects of
networking technologies, including TCP/IP and the OSI models.
COMPTIA NETWORK+
COMPTIA A+
COMPTIA ACCESS
COMPTIA A+

Answers

The COMPTIA NETWORK+ tests the ability of a networking technician to install, maintain, troubleshoot, and support a network, and understand various aspects of networking technologies, including TCP/IP and the OSI models.

Who is a Network Technician?

This refers to a person that oversees a network to check and control the vulnerabilities in it.

Hence, we can see that The COMPTIA NETWORK+ tests the ability of a networking technician to install, maintain, troubleshoot, and support a network, and understand various aspects of networking technologies.

Read more about network certifications here:

https://brainly.com/question/14472075

#SPJ1

Answer:compita network+

Explanation:I just did it and got it right big w

State OLLORS Assignment 5 uses of Database Management. Answer​

Answers

Database management has several important applications, including data storage and retrieval, data analysis, data integration, security management, and data backup and recovery.

One of the primary uses of database management is to store and retrieve data efficiently. Databases provide a structured framework for organizing and storing large volumes of data, allowing users to easily access and retrieve information when needed.

Another key application is data analysis, where databases enable the efficient processing and analysis of large datasets to derive meaningful insights and make informed decisions. Database management also plays a crucial role in data integration, allowing organizations to consolidate data from various sources into a single, unified view.

Additionally, database management systems include robust security features to ensure the confidentiality, integrity, and availability of data, protecting against unauthorized access and data breaches.

Finally, databases facilitate data backup and recovery processes, allowing organizations to create regular backups and restore data in the event of system failures, disasters, or data loss incidents.

Overall, database management systems provide essential tools and functionalities for effectively managing and leveraging data in various domains and industries.

For more questions on Database management

https://brainly.com/question/13266483

#SPJ8

Which of the following is NOT solely an Internet-based company?
Netflix®
Amazon®
Pandora®
CNN®

Answers

Answer:

I think it's Pandora, though I am familiar with others

Answer:

CNN

Explanation:

DID I PUT IT IN THE RIGHT ORDER?!!
PLEASE TELL ME IF IM RIGHT OR WRONG

DID I PUT IT IN THE RIGHT ORDER?!!PLEASE TELL ME IF IM RIGHT OR WRONG

Answers

Answer:

Its correct!

Explanation:

The primary function of a web server is to store, process and deliver web pages to the clients. You are required to clearly identify the purpose and relationships between communication protocols, web server hardware, web server software with regards to designing, publishing and accessing a website.

Answers

Answer:

The main job of a web server is to display website content through storing, processing and delivering webpages to users. Besides HTTP, web servers also support SMTP (Simple Mail Transfer Protocol) and FTP (File Transfer Protocol), used for email, file transfer and storage.

Explanation:

If it helps you mark me as a brainleast

You take a loan from a friend and need to calculate how much you will owe him after 3 months.

Answers

The loan was for $100 and the interest rate is 10%.

What do you mean by loan?

A loan is the lending of money by one or more persons, organisations, or other entities to other individuals, organisations, or other entities in finance. The recipient (i.e., the borrower) incurs a debt and is typically required to pay interest on that loan until it is repaid, in addition to repaying the primary amount borrowed. The paper demonstrating the loan (for example, a promissory note) will often indicate the principal amount borrowed, the interest rate charged by the lender, and the date of repayment.

$100 + ($100 × (10/100))

= $110

To learn more about loan
https://brainly.com/question/25696681

#SPJ1

Other Questions
When creating a PowerPoint presentation, what does it mean to apply movement to text or an object to control its display during the presentation? Group of answer choices animate hyperlink slide layout transitions economists assume that rational people group of answer choices never use all available information as they act to achieve their goals. only weigh the benefits and costs of the most desirable alternative actions. undertake activities that benefit others and hurt themselves. respond to economic incentives. the phase of the bacterial growth curve that shows the maximum rate of cell division is the ___ phase The Coronavirus invades 2 types of cells in the lungs, mucus cells and __________.cilia cellsair cellsblood cellsbreathing cells which of the following methods can be used to track goal progress? check all that apply.maintaining slack resourcessetting proximal and distal goalsproviding performance feedbackusing options-based planning Complete the statement to describe the expression ab + cdab+cda, b, plus, c, d. The expression consists of terms, and each term contains factors. What is Cugoano's purpose? help ity help ity help help help The cost of the building a multi-storey building is K300,000 for the first floor, k375,000 for the second floor and K450,000 for the third floor and so on. Find the total cost, if the building is 8 stories high? Select the correct answer. Which of the following statements describes the command economy of the Soviet Union? A. The government allowed private businesses to produce goods and services demanded by the market. B. The government decided what goods and services would be produced and supplied to the market. C. The government allowed workers to own the means of production. D. The government ensured high wages for workers. Reset Next What are the 2 primary functions for drawing write 5 advantages and disadvantges of force. aka. physicsaka. pull and push in addition to selecting the rule type and conditions, what else must you select when building a conditional formatting rule? objects such as the great nebula in andromeda were once called extragalactic nebulae. it is now realized that they are actually (A) inside our own galaxy.(B) small objects just outside our own galaxy.(C) other galaxies much like our own. Find 9 1/4+2/7. Write your answer as a fraction in simplest form. How many half-lives have passed when there are three times as much daughter isotope as parent isotope? In the democracies of the Middle East, government leaders are chosen by __________.In the democracies of the Middle East, government leaders are chosen by __________. Use long division to divide (6x^2 - 39x -21) / (x -7) The graph of the set of ordered pairs below represents a linear function. Find the rate of change.{(1,3), (2,5), (3,7), (4,9)} Which 3 Dimensional shape would be created if the square above was rotated about it's y-axis?Those are the options, and the shape is a square