Write a main function that declares an array of 100 ints. Fill the array with random values between 1 and 100.Calculate the average of the values in the array. Output the average.

Answers

Answer 1

Answer:

#include <stdio.h>

int main()

{

   int avg = 0;

   int sum =0;

   int x=0;

   /* Array- declaration – length 4*/

   int num[4];

   /* We are using a for loop to traverse through the array

    * while storing the entered values in the array

    */

   for (x=0; x<4;x++)

   {

       printf("Enter number %d \n", (x+1));

       scanf("%d", &num[x]);

   }

   for (x=0; x<4;x++)

   {

       sum = sum+num[x];

   }

   avg = sum/4;

   printf("Average of entered number is: %d", avg);

   return 0;

}


Related Questions

hi, please help me, please help me.​

Answers

my day has been good
hope this helps

The program is the set of instructions a computer obeys

Answers

Answer:

True

Explanation:

a program is basicly just a list of commands you can run over and over again.

Type the correct answer in the box. Spell all words correctly.
Which testing requires coding the test cases into a scripting language?
testing requires coding the test cases into a scripting language.

Answers

Answer:

sorry I forgot it

Explanation:

because I am now in a last position

While troubleshooting an Internet connection problem for your network, you restarted the modem and then the router. The router is now communicating with the Internet, which you can confirm by observing the blinking light on the router's WAN indicator. However, now your laptop is not communicating with the router. Order the commands below to fix the problem and confirm connectivity.
a. ping
b. ipconfig /renew
c. nslookup microsoft.com
d. ipconfig /release

Answers

Answer:

d. ipconfig /release

b. ipconfig /renew

a. ping

c. nslookup microsoft.com

Explanation:

A router can be defined as a network device that is designed typically for forwarding data packets between two or more networks based on a well-defined routing protocol.

Basically, it is an electrical device or node that is designed to connect two (2) different networks (in different locations) together and allows them to communicate.

Generally, routers are configured using a standard routing protocol with an IP address as the default gateway.

Dynamic Host Configuration Protocol (DHCP) is a standard protocol that assigns IP address to users automatically from the DHCP server.

Basically, a DHCP server is designed to automatically assign internet protocol (IP) address to network devices connected to its network using a preconfigured DHCP pool and port number 67.

On a related note, when a computer that is configured with DHCP cannot communicate or obtain an IP address from the DHCP server, the Windows operating system (OS) of the computer automatically assigns an IP address of 169.254.33.16, which typically limits the computer to only communicate within its network.

I. ipconfig /release

II.. ipconfig /renew

III. ping

IV. nslookup microsoft.com

DESCRIBE THE GENERAL STRATEGY BEHIND DEALOCK PREVENTION AND GIVE A PRATICAL EXAMPLE

Answers

Answer:

........

Explanation:..........

Argue whether we can infer anything about a candidate’s ability to work in a professional environment based on his or her resume’s formatting.
Compare how you would address a resume with wacky fonts to how you would respond to grammatical errors in a resume.

Answers

Answer:

when dressing feaded back is postive and then list areas of inprovmenr to met the job requirements

Explanation:

What is wrong with the following if statement (there are at least 3 errors).
The Indentation indicates the desired behavior.

if numNeighbors >= 3 || numNeighbors = 4
++numNeighbors;
printf ("You are dead! \n “);
else
--numNeighbors;

Answers

In programming, if statements are used to test conditions. The statement to be executed will be determined by the result of the conditions. A statement will be executed if its accompanying condition is true.

The errors in the given code segment are as follows:

The if condition on line 1 should be in a closed bracket; i.e. ()The if condition has more than 1 statements to execute. So, it requires a curly bracket; i.e. {}The second part of the first condition should be == 4 and not =4; because the proper operator to make comparison is == while = is used as an assignment operator

The correct code is as follows:

if (numNeighbors >= 3 || numNeighbors == 4) {

++numNeighbors;

printf ("You are dead! \n “); }

else

--numNeighbors;

Read more about conditional statements at:

https://brainly.com/question/20228453

Fit a boosting model to the training set with Purchase as the response and the other variables as predictors. Use 1,000 trees, and a shrinkage value of 0.01. Which predictors appear to be the most important

Answers

Answer and Explanation:

For the training set consist of 1000 observations, let's have a set consist of the observations such as sets.seed train boost.caravan gbm(Purchase., data = Caravan.train , distribution = "gaussian" , n trees = 1000 summary(boost.caravan) The tree classification such as tree(formula = Purchase data - train where variable are used in tree construction and number of terminal nodes 0 and deviance is 0.7 and error is 0.165

Chất xơ có nhiều trong thực phẩm nào?

Answers

Answer: rau củ quả đều có lượng chất xơ nhiều hơn so với các loại thực phẩn khác

Explanation:

Cryptarithmetic algorithm

Answers

Answer:

CryptArithmetic or verbal arithmetic is a class of mathematical puzzles in which the digits are replaced by letters of the alphabet or other symbols. Usually it is required that each letter would be replaced by a unique digit. Each letter having different value from the other letters.

Explanation:

Cryptarithm now denotes mathematical problems usually calling for addition, subtraction, multiplication, or division and replacement of the digits by letters of the alphabet or some other symbols. ... Since D × B has only one digit, B must be 3 or less. The only two possibilities are 0 and 2.

write a java program that prompts the user to enter scores (each number an integer from 0 to 10) and prints the following output: how many scores entered the highest score the lowest score the average of all the scores the average with the highest and lowest score not counted if the user enters less than 3 scores print an error message instead of the output above

Answers

Answer:

Explanation:

The following is written in Java. It continues asking the user for inputs until they enter a -1. Then it saves all the values into an array and calculates the number of values entered, the highest, and lowest, and prints all the variables to the screen. The code was tested and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int count = 0;

       int highest, lowest;

       ArrayList<Integer> myArr = new ArrayList<>();

       while (true) {

           System.out.println("Enter a number [0-10] or -1 to exit");

           int num = in.nextInt();

           if (num != -1) {

               if ((num >= 0) && (num <= 10)) {

                   count+= 1;

                   myArr.add(num);

               } else {

                   System.out.println("Wrong Value");

               }

           } else {

               break;

           }

       }

       if (myArr.size() > 3) {

           highest = myArr.get(0);

           lowest = myArr.get(0);

           for (int x: myArr) {

               if (x > highest) {

                   highest = x;

               }

               if (x < lowest) {

                   lowest = x;

               }

           }

           System.out.println("Number of Elements: " + count);

           System.out.println("Highest: " + highest);

           System.out.println("Lowest : " + lowest);

       } else {

           System.out.println("Number of Elements: " + count);

           System.out.println("No Highest or Lowest Elements");

       }

   }

}

Khi thu nhập giảm, các yếu tố khác không đổi, giá cả và sản lượng cân bằng mới của hàng hóa thông thường sẽ:

Answers

Answer:

thấp hơn

Explanation:

What is indirect program memory addressing? Explain the working of the following instructions?

a) JMP AX
b) JMP LIST[DX]
c) JMP NEAR PTR[DI+3]

Answers

Indirect main memory addressing is described as the method in which the variable's address is stored in a mind register and also a command is utilized to point towards the memory registers which hold the register. Instruction is used to direct towards a register that displays the results of the variables. The register, in turn, refers to that variable's address in simplistic words. As just a result, it is indeed considered a passive program, memory address.

The instructions operate as follows:

a)

JMP AX :

The JMP instruction is being used to execute an unconditional jump.AX is indeed the label's name. JMP AX codes are being used to transfer control of the flow program to the AX label.

b)

JMP LIST:

The JMP command can be used to execute an unconditional jump, JMP LIST[DX] is the label's name.  The JMP LIST[DX] program is being used to transfer control of its flow programs to the specified section. It is the segment to which the flow control is transmitted.

c)

JMP NEAR PTR[DI+3]: 

Unconditional jumps could be done with the JMP command as you'll see, the label is JMP NEAR PTR[DI+3]. It's being used to transmit flow control to a particular section, throughout this case [DI+3]. The close keyword indicates that perhaps the code segment would be in the line of code being nearby.

Learn more:

brainly.com/question/20320915

Sydnee would like a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

O The chart is placed in the header and footer of a database
O The chart is placed in the field of a database.
O The chart is placed in a database with one group
O The chart is placed in a database with five groups​

Answers

AnswerSydnee would like a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem? a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

O The chart is placed in the header and footer of a database

O The chart is placed in th a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem? a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placed

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placede field of a database.

O The chart is placed in a database with one group

O The chart is placed

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placed

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placed in a database with five groups​ :nce in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placed in a database with five groups​

Hold on, our servers are swamped. Wait for your answer to fully load.

Explanation:

Sydnee would like a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem? a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

a chart to appear once in her report, but she is having wouble making this occur She does not understand why the chart is showing multiple times in the report. What is most likely causing the problem?

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placed

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placed

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placed

O The chart is placed in the header and footer of a database

O The chart is placed in the field of a database.

O The chart is placed in a database with one group

O The chart is placed

O The chart is placed in a database with five groups​

How to prepare and draw a corresponding flowchart to compute the sum and product of all prime numbers between 1 and 50

Answers

Answer:

Create boxes with the following content

Initialize sum to 0, product to 1 and number to 1Check if number is a prime. If yes, update sum += number and product *= numberIncrease number by 1If number is <= 50, go back to "check" block.

The check block has a diamond shape.

At the "yes" branch of the check block, you can create separate blocks for updating the sum and the product.

Connect the blocks using arrows.

Indicate the start and the end of the flow using the appropriate symbols.

The block to check if a number is a prime you could further decompose into the steps needed to do such a check.

I connected to an external hard drive to transfer some photos from my vacation. When I try to drag the photo, it bounces right back and does not transfer. What is the likely cause of this issue?

a. hard drive is full

b. photos were taken in a different country

c. USB port is broken

d. the file structure of the 2 hard drives are not compatible

Answers

Your answer is D.

Hope this helps and if you could answer the question I just uploaded titled giving brainliest that would be great. Basically, what you have to do is research why the book titled the list of things that will not change and explain why it’s your favorite book based on the message it tells you! Go to my profile and go to questions.

The answer is D, What is the likely cause of this issue is that the file structure of the two hard drives are not compatible.

The file structure or file system, of a hard drive, tells the disk how to read, write and store information on the drive. Some file systems do not allow the disk to store any files and often do not display error messages. If we try to drag a file onto a hard drive with this kind of file structure, the action would simply not be performed. This can be fixed by formatting the disk partition into a new file system.

Option B states that the issue may be that the photos were taken in a different country. This is not the cause of the problem because regardless of where the pictures are taken, they are all stored in common formats such as:

JPEGPNGJFIF

Any external hard drive capable of storing images will have the ability to receive files in these formats as well as many other image formats. For this reason, option B is False.

The question states that you were able to connect the external Hard drive and drag files onto it, though unsuccessfully. This tells us that the USB port is working as intended, if it were not working, it would not display the Hard drive onto the computer and we would not be able to drag files to it. Therefore, option C is false

Insufficient Hard drive storage space is a common issue in not being able to transfer files between hard drives. However, if this were the case, the user would be shown a message displaying the error. The message may look like:

"Insufficient space on the disk.""The Disk is full.""Not enough memory to complete this action"

The exact wording may vary depending on the operating system in use. Since the question states that the files simply "bounces back" without an error message displaying, we can infer that option A is false.

For more help with Hard drive issues see: https://brainly.com/question/14254444?referrer=searchResults

hi, please help me.solution.​

Answers

Answer:

aahdbdnsjajaissjdjdhskakwjdhbebs

Pick a web browser (a leading one or perhaps a lesser-known one that you use) and examine the Privacy and Security features and settings. These can usually be found in the settings/options area of the browser. Identify the web browser you are analyzing and answer the following questions/prompts:
1. List and explain/discuss the privacy and security features that the browser has to offer.
2. How do these privacy and security features protect individuals?
3. How do these privacy and security features affect what businesses can do on the Internet in terms of gathering customer data?

Answers

Solution :

Chrome web browser

The Chrome web browser uses a range of privacy and security settings for its customers. They include several security indicators as well as malware protection. Chrome uses the sandboxing technology, which prevents the harmful viruses and Trojans from reaching the computers.

Chrome provides a safe browsing by giving us an alert whenever we try to browse some harmful web sites.  It also warns you if we use a username and password combination which has been compromised in any data leak.

Chrome also serves to protect the individuals :

It provides a features of Ad blocking.

When we want to browse safely without being recognized or without storing any credentials, Chrome provides an Incognito mode.

Many businesses can be done on the internet using Chrome platform that is safe and authenticate to gather and collect data and information.

d. Application software are developed by software companies ​

Answers

Answer:

May this help you l think

Explanation:

There are several different types. They can be grouped into four basic categories:

Application development that provides functionality for users to perform tasks. Examples include office productivity suites, media players, social media tools, and booking systems. Applications can run on the user’s own personal computing equipment or on servers hosted in the cloud or by an internal IT department. Media streaming development is one example of application development for the cloud.

2.System software development to provide the core functions such as operating systems, storage systems, databases, networks, and hardware management.

Write a function named square_list that takes as a parameter a list of numbers and replaces each value with the square of that value. It should not return anything - it should mutate the original list.

Answers

Answer:

The function is as follows:

def square_list(myList):

   for i in range(len(myList)):

       myList[i] = myList[i]**2

   print(myList)

Explanation:

This defines the function

def square_list(myList):

This iterates through the list elements

   for i in range(len(myList)):

This squares each list element

       myList[i] = myList[i]**2

This prints the mutated list

   print(myList)

An error due to wrong input by the user

Answers

Answer:

when did it take place..

Code Example 9-1 struct Product { string name; double price; int quantity; }; (Refer to Code Example 9-1.) Given a Product object named product, which of the following statements would you use to display the value of the name data member on the console? a. cout << product::name; b. cout << product.name; c. cout << product("name"); d. cout << product[0];

Answers

Answer:

a. cout << Product ::name;

Explanation:

Computer software use different languages which helps user to initiate command. When a user initiates command the results are displayed according to input command. If product name is required as output then insert command should be product::name; this will display names of different products present in the system.

code bãi gửi xe siêu thị thì được viết như nào?cho em xin ví dụ vs ạ?

Answers

Answer:

https://sharecode.vn/source-code/phan-mem-gui-xe-dua-tren-cong-nghe-nhan-dien-bien-so-qrcode-20588.htm

Select the correct statement(s) regarding IP addressing.
a. IPv4 and IPv6 addressing is fully compatible with one another.
b. CIDR address format represents a Class C network only used within an intranet.
c. Subnet masks are used with both class and classless IP addresses.
d. all statements are correct.

Answers

Yeah the answer is b

Subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.

What is an IP address?

A device on the internet or a local network may be identified by its IP address, which is a special address. The rules defining the format of data delivered over the internet or a local network are known as “Internet Protocol,” or IP.

Only C is correct, rest other statements are incorrect because:

a. IPv4 and IPv6 addressing is fully compatible with one another is incorrect. While IPv4 and IPv6 can coexist on the same network, they are not fully compatible with one another.

b. CIDR address format represents a Class C network only used within an intranet is incorrect. Classless Inter-Domain Routing (CIDR) is a technique used to allocate IP addresses more efficiently.

Therefore, subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.

Learn more about,  here

https://brainly.com/question/3805118

#SPJ6

Explain the purpose of the open() and close() operations.

Answers

Answer:

The open() operation notifies the system that the named file is about to become active. The close() operation notifies the system that the named file is no longer in active use by the user who issued the close operation.

(1)similarities between backspace key and delete key. (2) different between backspace key and delete key. (3) explain the term ergonomics. (4) explain the following. a click b right click double click d triple click e drag and drop.​

Answers

Answer:

ddhejaajegxhzi

Explanation:

jfrhsjadigugud

If you are to enhance the ICT used by your teachers, how will ypu do it? Will you use the same ICT or will you modify how it was integrated?​

Answers

To enhance the ICT (Information Communication Technology) used by teachers, I will modify how the ICT was integrated.

The modification of how ICT is integrated will change the culture that places teaching over technology.  Then, teachers will be taught how to use ICT to:

improve learning so that teachers become learning facilitatorsmotivate learners by fostering learning autonomy, making students less dependent on the teacherengage the learners by creating collaborative learningdiminish content learning so that students learn to think, create, and communicate effectivelymake learning a lifetime culture enhance the learning environment so that teachers become collaborators and co-learners with students.

Thus, I will enhance the ICT used by teachers by modifying its integration to achieve better results for both teachers and learners.

Learn more about the importance of ICT here: https://brainly.com/question/13724249

What Causes #### error?​

Answers

Answer:

The answer is below

Explanation:

Causes of ####error in Microsoft Excel can be traced to multiple sources. The major causes of #### error in Microsoft Excel, however, are the following:

1. When the column is not wide enough to show all values or figures of the cell contents.

2. When there are too many decimal places of the figure in a cell

3. When the date value in the cell is negative

4. When the time value in the cell is negative.

Create a class, CallClass, with two methods to show call by value and call by reference. One method has two parameters that are any primitive types, whereas the other has a parameter that is an object of any class. Create a CallClassTest class that calls the two methods with proper arguments to show call by value and call by reference. You do not need to read the values of parameters from the screen. (5 pts)

Answers

Answer:

The output file is given below.

Explanation:

Please visit gotit-pro.com to get complete working code.

In the home tab under the paragraph group of options what are you unable to do?

Answers

Im not sure what this is?? Maybe add a picture or more context! ❤️
Other Questions
(b) In a sale the original prices are reduced by 15%.(i) Calculate the sale price of a book that has an original price of $12.$(ii)Calculate the original price of a jacket that has a sale price of $38.25. Name the organ of locomotion of englena and chlamydomonas A rectangle is divided into 25 equal parts. How many of these parts must be shaded in order to cover three fifths of the rectangle? PLEASE HELP ASAP!! (stuck on this and it's due in 45 mins)Graph JKL with vertices J(-3, 4) K (4, 4), and L (6, -2) 1. Graph the image of JKL after a translation of 1 unit left and 10 units up. Label the image J'K'L'2. Then translate JKL 9 units right and 5 units down. Label this image J"K"L.3. What translation would move JKL to J"K" L directly?A. 8 units right and 5 units up B. 10 units left and 5 units upC. 8 units right and 5 units upD. 8 units right and 10 units up? An unlevered firm has a cost of capital of 12.46 percent and a tax rate of 35 percent. The firm is considering a new capital structure with 35 percent debt. The interest rate on the debt would be 6.68 percent. What would be the firm's levered cost of A small cruise ship struck a whale swimming underwater, causing the ship to suddenly lurch sideways. A passenger on the ship who was walking down a corridor lost his balance and bumped his head on the edge of a doorway. Because of a previously existing medical condition that made him susceptible to bleeding on the brain, he suffered a cerebral hemorrhage and permanent mental impairment, despite prompt medical attention on the ship. The passenger brought suit against the cruise ship owner for his damages. At trial, the passenger presented evidence of how he was injured as he walked down the hallway, his previous medical condition, and his medical expenses and other damages. The cruise ship owner presented evidence that the cruise ship was following its approved route and that the whale could not have been detected before impact, and that the bump would not have injured someone in ordinary health. At the close of the evidence, the cruise ship owner moved for a directed verdict. How should the court rule What are the two main phases of the cell cycle 1. How can stories reveal the fears and worries of a particular culture? Define guidance and counseling in the perspective of five authors clearly stating the differences and similarities between the two terms? 10 orange sodas, 15 cream sodas and 7 cherry sodas are in an ice chest. How many sodas must be removed from the chest to guarantee that on type of soda has been chosen?PLEASE, GIVE A STEP BY STEP EXPLANATION Daisy (5,9,2,6,14,3)Milkweed (10,8,22,12,12,9)Coneflower (3,7,2,10,16,7)A biology class took a field trip. The students counted the number of daisy, milkweed, and coneflower plants in six different locations. The data sets are shown above. What is the overall range in the number of plants for all three types of plants? Tres deberes que puedo cumplir en mi familia desde el mensaje cristiano, es para hoy porfavor respondan Avogradro's number is the number of particles in one gram of carbon- 12 atom true or false? Which of the following describes a major demographic change resulting from the first contact between American Indians and European explorers? A. A shift in American Indian populations from east to west. B. A rapid expansion of forested areas in the Pacific Northwest C. A reduction in air quality due to the introduction of agriculture. D. A decrease in the diversity of plant and animal life in North America.I WILL MARK BRAINLIEST [tex]2 \sqrt{75} - \sqrt{108} + 5 \sqrt{48}[/tex] write technical terms for the following statements. A) A collection of programs which make computer work. B) A language processor that converts assembly language codes in to machine language.C)Software that is the basic requirement of a computer. D) The software which help to maintain the hardware and software. E) Applications software that is designed for an organization.F)The software which does not provide right to modify. G) The binary code obtained after the translation of source code. H) The application which is needs internet to access and update. In----- theory, the actual wishes that are threatening to the dreamers conscious awareness are disguised Marking brainliest please explain if you can (PICTURE) Trong th nghim v s khc x nh sng, mt hc sinh ghi li trn tm ba ba ng truyn ca nh sng nh hnh bn nhng qun khng ghi chiu truyn.Tia khc x l please answer correctly.