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

In this era of technology, everyone uses emails for mail and messages. Assume you have also used the
mailboxes for conversation. Model the object classes that might be used in Email system implementation
to represent a mailbox and an email message.
Assume You are working as a software engineer and now you have been asked to deliver a presentation to
a manager to justify the hiring of a system architect for a new project. Write a list of bullet points setting
out the key points in your presentation in which you explain the importance of software architecture

Answers

Answer:

A class may be a structured diagram that describes the structure of the system.  

It consists of sophistication name, attributes, methods, and responsibilities.  

A mailbox and an email message have certain attributes like, compose, reply, draft, inbox, etc.

Software architecture affects:

Performance, Robustness, Distributability, Maintainability.  

Explanation:

See attachment for the Model object classes which may be utilized in the system implementation to represent a mailbox and an email message.

Advantages:

Large-scale reuse Software architecture is vital because it affects the performance, robustness, distributability, and maintainability of a system.

Individual components implement the functional system requirements, but the dominant influence on the non-functional system characteristics is that the system's architecture.

Three advantages of System architecture:

• Stakeholder communication: The architecture may be a high-level presentation of the system which will be used as attention for discussion by a variety of various stakeholders.

• System analysis: making the system architecture explicit at an early stage within the system development requires some analysis.

• Large-scale reuse:

An architectural model may be a compact, manageable description of how a system is organized and the way the components interoperate.

The system architecture is usually an equivalent for systems with similar requirements then can support large-scale software reuse..

Computer data that is suitable for sound​

Answers

Answer:

Answer:In this context sound data is stored and transmitted in an analog form. Since computers represent data in digital form, (as bits and bytes) the

Write a Java code statement for each of following:
a) To declare TWO (2) decimal numbers, and ONE (1) whole number.​

Answers

Answer:

double decimal1, decimal2;

int whole;

Explanation:

Required

Declare 2 decimals and 1 int.

The syntax to declare a variable is:

data-type variable-name;

To declare decimal, we simply make use of double or float data types.

So, we have:

double decimal1, decimal2; ----> for the decimal variables

And

int whole; ---- for the whole number

How long does it take to send a 15 MiB file from Host A to Host B over a circuit-switched network, assuming: Total link transmission rate

Answers

Answer:

The answer is "102.2 milliseconds".

Explanation:

Given:

Size of file = 15 MiB

The transmission rate of the total link= 49.7 Gbps

User = 7

Time of setup = 84.5 ms

calculation:

[tex]1\ MiB = 2^{20} = 1048576\ bytes\\\\1\ MiB = 2^{20 \times 8}= 8388608\ bits\\\\15\ MiB= 8388608 \times 15 = 125829120\ bits\\\\[/tex]

So,

Total Number of bits [tex]= 125829120 \ bits[/tex]

Now

The transmission rate of the total link= 49.7 Gbps

[tex]1\ Gbps = 1000000000\ bps\\\\49.7 \ Gbps = 49.7 \times 1000000000 =49700000000\ bps\\\\FDM \ \ network[/tex]

[tex]\text{Calculating the transmission rate for 1 time slot:}[/tex]

[tex]=\frac{ 49700000000}{7} \ bits / second\\\\= 7100000000 \ bits / second\\\\ = \frac{49700000000}{(10^{3\times 7})} \ in\ milliseconds\\\\ =7100000 \ bits / millisecond[/tex]

Now,

[tex]\text{Total time taken to transmit 15 MiB of file} = \frac{\text{Total number of bits}}{\text{Transmission rate}}[/tex]

[tex]= \frac{125829120}{7100000}\\\\= 17.72\\\\[/tex]

[tex]\text{Total time = Setup time + Transmission Time}\\\\[/tex]  

                 [tex]= 84.5+ 17.72\\\\= 102.2 \ milliseconds[/tex]

nowwwwwww pleasssssssss

Answers

the technique used is Data Validation

how much is this worth in dollars​

Answers

Answer:

This is worth 50 dollars.

Explanation:

١ - one

٢ - two

٣ - three

٤ - four

٥ - five

٦ - six

٧ - seven

٨ - eight

٩ - nine

٠ - zero

What you see above is the ten digits in Arabic.

Both 5 (٥) and 0 (٠) appear here, thus representing 50.

The fastest way to pull financial data from the application into Excel as refreshable formulas that can be edited or updated is:

Answers

Answer:

Download the financial report as =FDS codes with cell referencing.

Explanation:

An excel is a spreadsheet that is developed by the Microsoft company for the Windows operating system. It can be also used in iOS, macOS and Android. It has many features including  graphing tools, calculation, pivot tables, etc.

In excel the fastest way to pull out a financial data from an application into the Excel as the refreshable formulas which can be edited or can be uploaded later on is by downloading the financial report as an +FDS code with the cell referencing.

In excel, cell refreshing is a way to refer to a cell in the formula.

Cardinality ratios often dictate the detailed design of a database. The cardinality ratio depends on the real-world meaning of the entity types involved and is defined by the specific application. For the binary relationships below, suggest cardinality ratios based on the common-sense meaning of the entity types. Clearly state any assumptions you make.
Entity 1 Cardinality Ratio Entity 2
1. Student SocialSecurityCard
2. Student Teacher
3. ClassRoom Wall
4. Country CurrentPresident
5. Course TextBook
6. Item (that can
be found in an
order) Order
7. Student Class
8. Class Instructor
9. Instructor Office
10. E-bay Auction item E-bay bid

Answers

Solution :

ENTITY 1               CARDINALITY RATIO                                     ENTITY 2

1. Student                        1 to many                                     Social security card

                      A student may have more than one          

                     social security card (legally with the

                      same unique social security number),

                     and every social security number belongs

                   to a unique.

2. Student                   Many to Many                                    Teacher

                    Generally students are taught by many

                    teachers and a teacher teaches many students.

3.ClassRoom               Many to Many                                   Wall

                      Do not forget that the wall is usually

                      shared by adjacent rooms.

4. Country                 1 to 1                                             Current President

                       Assuming a normal country under normal

                       circumstances having one president at a

                      time.

5. Course               Many to Many                               TextBook

                        A course may have many textbooks and

                       text book may be prescribed for different

                      courses.

6. Item                             Many to Many                           Order

                        Assuming the same item can appear

                         in different orders.

7. Student                       Many to Many                          Class

                        One student may take several classes.

                        Every class usually has several students.

8. Class                                 Many to 1                             Instructor

                       Assuming that every class has a unique

                        instructor. In case instructors were allowed

                        to team teach, this will be many-many.

9. Instructor                  1 to 1                                             Office

                       Assuming every instructor has only one

                      office and it is not shared. In case of offices

                     shared by 2 instructors, the relationship

                    will be 2-1. Conversely, if any instructor has a joint

                    appointment and offices in both departments,

                    then the relationship will be 1-2. In a very general

                  case, it may be many-many.

10. E-bay Auction item             1-Many                           E-bay bid

                        1 item has many bids and a bid is unique

                        to an item.

Write an application that finds the smallest of several integers. Assume that the first value read specifies the number of values to input from the user. C

Answers

Answer:

Following are the code to the given question:

#include<stdio.h>//include header file  

int main() //defining a main method

{  

   int a[100],k,x,s; //defining integer variable and an array  

   printf("Input the number of element want to insert array: ");  //print message

   scanf("%d",&x);  //input value

   printf("Enter array value: \n"); //print message  

   for(k = 0; k<x; k++)  //defining a loop that inputs values

   {  

       scanf("%d",&a[k]);  //use array to input value

   }  

   s = a[0]; //holding first array value in array

   for(k=0;k<x;k++)  //use for loop

   {  

       if(a[k]<s)  //use if block to check the smallest array value

       {  

         s=a[k];//holding smallest array value

       }  

   }  

   printf("smallest number= %d",s);//print smallest value

}  

Output:

Please find the attached file.

Explanation:

In this code an array and another integer variable "a[100], i,n, and s" is is declared, in which the array and n for input the value from the user-end.

In the next step, an "s" variable is declared that inputs the first array element value in s and use a loop to check the smallest array element and prints its value.

This standard library function returns a random floating-point number in the range of 0.0 up to 1.0 (but not including 1.0).
a. random.b. randint.c. random_integer.d. uniform.

Answers

Answer:

The answer would be A: Random

Explanation:

The random() function returns a generated random number (a pseudorandom number)

A technician is configuring the static TCP/IP settings on a client computer.
Which of the following configurations are needed for internet communications?
a. DHCP server address
b. DNS server address
c. Default gateway address
d. WINS address
e. APIPA address
f. Alternate IP address
g. IP address including a subnet mask (IPv4) or subnet prefix length (IPv6)

Answers

Answer:

The answer is below

Explanation:

Considering the situation and the available options above, the following configurations are needed for internet communications:

B. DNS server address: this matches the domain name to the IP address of a website such that browsers can bring internet resources.

C. Default gateway address: this uses the internet protocol suites and serves as a router to other networks in the absence of other route specifications that could match the destination IP address of a packet.

G. IP address including a subnet mask (IPv4) or subnet prefix length (IPv6): this is used by the internet-connected device to receive messages.

Because GIS is largely a computer/information science that involves working with software in the privacy of one's own workspace, users of GIS rarely must be concerned with ethics or the ethical implications of their work.
a.True
b. False

Answers

Answer:

Hmm, I think it is true

Explanation:

Which of the following restricts the ability for individuals to reveal information present in some part of the database?

a. Access Control
b. Inference Control
c. Flow Control
d. Encyption

Answers

Answer:

it would have to be flow control which would be C.

Explanation:

Flow Control is restricts the ability for individuals to reveal information present in some part of the database. Hence, option C is correct.

What is Flow Control?

The management of data flow between computers, devices, or network nodes is known as flow control. This allows the data to be processed at an effective rate. Data overflow, which occurs when a device receives too much data before it can handle it, results in data loss or retransmission.

A design concern at the data link layer is flow control. It is a method that typically monitors the correct data flow from sender to recipient. It is very important because it allows the transmitter to convey data or information at a very quick rate, which allows the receiver to receive it and process it.

The amount of data transmitted to the receiver side without any acknowledgement is dealt with by flow control.

Thus, option C is correct.

For more information about Flow Control, click here:

https://brainly.com/question/28271160

#SPJ5

All of the following are technical solutions to protecting user privacy except: Group of answer choices Data use policies Anonymous email Preventing client computers from accepting cookies Email encryption Anonymous surfing

Answers

Answer:

Data use policies

Explanation:

Technically data use policies are not specifically made to protect user privacy, however it also should not violate user privacy. Data use policies are required by law. They are compulsory disclosures that list the various ways in which data in the form of personal data of individuals is collected, shared or used by digital companies(companies that operate on the internet, make use of email lists, etc ) are used.

Code an operation class called ArrayComputing that will ask user to enter a serials of integers with a loop until -99 is entered and after the input it will keep and display the greatest, the least, the sum and the average of the data entries (-99 is not counted as the data). And code a driver class called ArrayComputingApp to run and test the ArrayComputing class, separately.
Must use required/meaningful names for fields, variables, methods and classes.
Must use separate methods to perform each of specified tasks as described.
Must document each of your source code

Answers

Answer:

Explanation:

The following is written in Java and creates the ArrayComputing class. It uses the constructor to create the infinite loop that only breaks when the user enters a -99. After every input number it goes adding the correct values to the variables. Once it is done the user can call any of the getter methods to get the variable values as well as calculate the average.

import java.util.Scanner;

class ArrayComputingApp {

   public static void main(String[] args) {

       ArrayComputing arrayComputing = new ArrayComputing();

       System.out.println("Average: " + arrayComputing.getAverage());

       System.out.println("Greatest: " + arrayComputing.getGreatest());

       System.out.println("Least: " + arrayComputing.getLeast());

       System.out.println("Sum: " + arrayComputing.getSum());

   }

}

class ArrayComputing {

   int greatest, least, sum, average;

   int count = 0;

   Scanner in = new Scanner(System.in);

   public ArrayComputing() {

       while (true) {

           System.out.println("Enter a number or -99 to exit: ");

           int num = in.nextInt();

           if (num == -99) {

               break;

           }

           if (num > this.greatest) {

               this.greatest = num;

           }

           if (this.count == 0) {

               this.least = num;

           } else {

               if (num < this.least) {

                   this.least = num;

               }

           }

           this.sum += num;

           this.count += 1;

       }

   }

   public int getAverage() {

       this.average = sum / count;

       return this.average;

   }

   public int getGreatest() {

       return greatest;

   }

   public int getLeast() {

       return least;

   }

   public int getSum() {

       return sum;

   }

}

write an algorithm that reads to values, determines the largest value and prints the largest value with an identifying message ​

Answers

Answer:

I'm unsure of what language you are referring to, but the explanation below is in Python.

Explanation:

a = int(input("Input your first number: "))

b = int(input("Input your second number: "))  

c = int(input("Input your third number: "))

maximum = max(a, b, c)

print("The largest value: ", maximum)

What is the Open System Foundation?

Answers

Answer:

The Open Software Foundation (OSF) was a not-for-profit industry consortium for creating an open standard for an implementation of the operating system Unix. It was formed in 1988 and merged with X/Open in 1996, to become The Open Group.

Explanation:

YOUR PROFILE PIC IS CUTE :)

You are given a sequence of n songs where the ith song is l minutes long. You want to place all of the songs on an ordered series of CDs (e.g. CD 1, CD 2, CD 3,... ,CD k) where each CD can hold m minutes. Furthermore, (1) The songs must be recorded in the given order, song 1, song 2,..., song n. (2) All songs must be included. (3) No song may be split across CDs. Your goal is to determine how to place them on the CDs as to minimize the number of CDs needed. Give the most efficient algorithm you can to find an optimal solution for this problem, prove the algorithm is correct and analyze the time complexity

Answers

Answer:

This can be done by a greedy solution. The algorithm does the following:  

Put song 1 on CD1.

For song 1, if there's space left on the present CD, then put the song on the present CD. If not, use a replacement CD.

If there are not any CDs left, output "no solution".

Explanation:  

The main thing is prove the correctness, do that by the "greedy stays ahead argument". For the primary song, the greedy solution is perfect trivially.  

Now, let the optimal solution match the greedy solution upto song i. Then, if the present CD has space and optimal solution puts song (i+1) on an equivalent CD, then the greedy and optimal match, hence greedy is not any worse than the optimal.Else, optimal puts song (i + 1) on subsequent CD. Consider an answer during which only song (i + 1) is moved to the present CD and zip else is modified. Clearly this is often another valid solution and no worse than the optimal, hence greedy is not any worse than the optimal solution during this case either. This proves the correctness of the algorithm. As for every song, there are constantly many operations to try to do, the complexity is O(n).

The next few questions will be based on interpretations of a topographic map from East Brownsville, TX. To answer these questions you will have to access the topographic map of East Brownsville attached below:
What stage of fluvial landscape development is shown across the region displayed here?
a. Youthful
b. Mature
c. Old age

Answers

Answer:

a. Youthful

Explanation:

The river gets its water from youth stage fluvial water. The river meanders from side to side. East Brownsville will be less stable in international boundary in terms of physical position on the landscape because its base level drops.

Given an array of n distinct integers sorted in ascending order, write a function that returns a Fixed Point in the array, if there is any Fixed Point present in array, else returns -1. Fixed Point in an array is an index i such that arr[i] is equal to i. Note that integers in array can be negative. Examples: #include using namespace std; void removeDivByFive(int *arr,int& size) { int index=0; for(int i=0;i

Answers

Answer:

The function is as follows:

int returnsFixed(int arr [],int n){

   int retVal = -1;

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

       if(i == arr[i]){

           retVal = i;

           break;

       }

   }

   return retVal;

}

Explanation:

This defines the functionl it receives the array and the length of the array

int returnsFixed(int arr [],int n){

This initializes the return value to -1

   int retVal = -1;

This iterates through the array

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

This checks if i equals arr[i]

       if(i == arr[i]){

If yes, the return value (i.e. the fixed point) is set to i

           retVal = i;

And the code is exited

           break;

       } This ends the if condition

   } This ends the iteration

This returns the calculated fixed point

   return retVal;

}

Calculate how much disk space (in sectors, tracks, and surfaces) will be required to
store 300,000 120-byte logical records if the disk is fixed sector with 512 bytes/
sector, with 96 sectors/track, 110 tracks per surface, and 8 usable surfaces. Ignore
any file header record(s) and track indexes, and assume that records cannot span
two sectors.

It will be great if you could explain the answer to me. :)

Answers

Answer:

see your answer in image

mark me brainlist

The amount of disk space in sectors that would be required to store 300,000 records is equal to 75,000 sectors.

Given the following data:

Number of records = 300,000.Size of each logical record = 120 byte.Number of bytes (sector) = 512.Number of sectors per track = 96.Number of tracks per surface = 110.

How to calculate the required disk space?

First of all, we would determine the number of logical records that can be held by each sector as follows:

Number of logical records per sector = 512/120

Number of logical records per sector = 4.3 ≈ 4.0.

Now, we can calculate the required disk space to store 300,000 records:

Disk space = 300,000/4

Disk space = 75,000 sectors.

For the tracks, we have:

Disk space in tracks = 75,000/96

Disk space in tracks = 781.25 ≈ 782.

Disk space in tracks = 782 tracks.

For the surfaces, we have:

Disk space in surfaces = 782/110

Disk space in surfaces = 7.10 ≈ 8.

Disk space in surfaces = 8 surfaces.

Read more on disk space here: https://brainly.com/question/26382243

2. Which tab is used to edit objects on the Slide Master and layouts?
A. View
B. Insert
C. Shape format
D. Design

Answer is not A. View
It’s B. Insert

Answers

Answer:

it is....insert tab..B

Explanation:

insert tab includes editing options

Modeling and simulation can enhance the Systems Engineering process by:__________.
a. Helping IPT members to understand the interrelationship of components without physically changing the system.
b. Providing designs that will consistently exceed functional capabilities.
c. Quickly providing physical solutions to meet functional capabilities.
d. Eliminating technical risk before production begins.

Answers

C the Quiclyprovideinf

A majority of the people whose information was compromised are homeless; therefore there is no easy way to contact them in order to alert them of the security breach. How should Data-Time Inc. manage this breach in security

Answers

Incomplete question. Here's the full question:

Data-Time Inc. is a company that manages databases for a large city in Colorado. Included in these databases is information collected from the city’s homeless shelters and free clinics. Specifically, the databases contain personal information of the users of these services over the past 10 years; this includes people’s Social Security numbers and health records.

This data is highly secure and only accessible to the employees of Data-Time Inc. Employees are given a laptop when they are hired which allows them to access the database remotely. Unfortunately, one of these laptops is stolen and the security of the database is compromised.

A majority of the people whose information was compromised are homeless; therefore there is no easy way to contact them in order to alert them of the security breach. How should Data-Time Inc. manage this breach in security?

Explanation:

Since the emphasis is not on reversing the breach that has occurred, but on managing the level of security damage that could occur, it is important measures are directed towards preventing unauthorized access to sensitive information.

For example, the Media Access Control Address (MAC address) of the laptop if known could be greylisted from accessing the server that contains the sensitive information.

what is a mirror site?

Answers

Mirror sites or mirrors are replicas of other websites or any network node. The concept of mirroring applies to network services accessible through any protocol, such as HTTP or FTP. Such sites have different URLs than the original site, but host identical or near-identical content.
ANSWER: Mirror sites, often known as mirrors, are exact copies of other websites or network nodes.

A technician needs to manage a Linux-based system from the GUI remotely. Which of the technician should the technician deploy

Answers

Complete Question:

A technician needs to manage a Linux-based system from the GUI remotely.  Which of the following technologies should the technician deploy?

A. RDP  

B. SSH  

C. VNC  

D. Telnet

Answer:

Managing a Linux-based System from the GUI Remotely

The technology that the technician should deploy to manage the Graphic User Interface (GUI) remotely is:

C. VNC

Explanation:

VNC stands for Virtual Network Computing. This computing technology enables a remote user to access and control another computer to execute commands. It acts as a cross-platform screen-sharing system and is used to remotely access and control another computer. VNC makes a computer screen, keyboard, and mouse available to be seen and used from a remote distance.  The remote user does everything from a secondary device without being in front of the primary computer or device.  An example of a good VNC is TeamViewer.

Draw a Card. Write a program to simulate drawing a card. Your program will randomly select one card from a deck of 52 playing cards. Your program should display the rank (Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King) and suit (Clubs, Diamonds, Hearts, Spades) of the card. Here is a sample run of the program: in The card you picked is Jack of Heart The program should use at a minimum: sequence, selection, arrays, and random numbers.

Answers

Answer:

Explanation:

The following code is written in Java. It is a function that creates a Random object to generate random values, then uses those values to choose a random rank and suit using switch statements. It then saves the rank and suit into a String variable in the correct format and finally prints the card that was picked to the screen. The function was called 4 times in the main method and the output can be seen in the attached image below.

public static void randomCardGenerator() {

       Random rand = new Random();

       int rank = rand.nextInt(14)+1;

       int suit = rand.nextInt(4)+1;

       String chosenCard = "";

       switch (rank) {

           case 1: chosenCard += "Ace"; break;

           case 2: chosenCard += "1"; break;

           case 3: chosenCard += "2"; break;

           case 4: chosenCard += "3"; break;

           case 5: chosenCard += "4"; break;

           case 6: chosenCard += "5"; break;

           case 7: chosenCard += "6"; break;

           case 8: chosenCard += "7"; break;

           case 9: chosenCard += "8"; break;

           case 10: chosenCard += "9"; break;

           case 11: chosenCard += "10"; break;

           case 12: chosenCard += "Jack"; break;

           case 13: chosenCard += "Queen"; break;

           case 14: chosenCard += "Kind"; break;

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

       }

       chosenCard += " of ";

       switch (suit) {

           case 1: chosenCard += "Clubs"; break;

           case 2: chosenCard += "Diamonds"; break;

           case 3: chosenCard += "Hearts"; break;

           case 4: chosenCard += "Spades"; break;

           default: System.out.println("Invalid Suit");

       }

       System.out.println(chosenCard);

   }

Can anyone decipher these? There a bit random. Maybe binary but if there are other ways please include them.​

Answers

Answer:

Explanation:

so this is what "format" is about,   it's saying what do the ones and zeros represent.   b/c the bits can represent lots of different things ,  like letters with ascii code ,   and that's got several types.  some are 8 bits,  some are 16 bits,  the questions  you've shown are in groups of 5 which is really not a "thing" in binary,  it's always by twos,   without some type of  "frame work"  around the bits, we won't know what they represent,  if that is helping?   the important part is what is the "frame work"   that these bits are in.

all of your questions seem to have some  "art"  thing going on,  they make some kinda of binary artwork,  for what they are saying, that's not what's important.  Other than if they form  palindromes,   maybe that's what the questions are really about, how these do from palindromes, that is, they read the same backwards as forwards... I know.. why would anyone read backwards.. but a computer can do that pretty quickly,  sooo sometimes to check,  it will read  forwards and backwards.. but when there is a palindrome,  the computer is "confused"  

this is also a big big part of  "typing"  not like on a keyboard but when you program, and you say that  your variables are of a certain type,  like a char, or a string, or a double, you are specifying how many bits will be used to represent your data.  so then when you put the ones and zeros into the memory ,  ( think RAM)  then it's stored in groups of what ever size you've determined.    hmmmm   does this help?

Write a program in c++ that will:1. Call a function to input temperatures for consecutive days in 1D array. NOTE: The temperatures will be integer numbers. There will be no more than 10 temperatures.The user will input the number of temperatures to be read. There will be no more than 10 temperatures.2. Call a function to sort the array by ascending order. You can use any sorting algorithm you wish as long as you can explain it.3. Call a function that will return the average of the temperatures. The average should be displayed to two decimal places.Sample Run:Please input the number of temperatures to be read5Input temperature 1:68Input temperature 2:75Input temperature 3:36Input temperature 4:91Input temperature 5:84Sorted temperature array in ascending order is 36 68 75 84 91The average temperature is 70.80The highest temperature is 91.00The lowest temperature is 36.00

Answers

Answer:

The program in C++ is as follows:

#include <iostream>

#include <iomanip>

using namespace std;

int* sortArray(int temp [], int n){

   int tmp;

   for(int i = 0;i < n-1;i++){

 for (int j = i + 1;j < n;j++){

  if (temp[i] > temp[j]){

   tmp  = temp[i];

   temp[i] = temp[j];

   temp[j] = tmp;   }  } }

return temp;

}

float average(int temp [], int n){

   float sum = 0;

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

       sum+=temp[i];    }

   return sum/n;

}

int main(){

   int n;

   cout<<"Number of temperatures: ";    cin>>n;

   while(n>10){

       cout<<"Number of temperatures: ";    cin>>n;    }

   int temp[n];

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

       cout<<"Input temperature "<<i+1<<": ";

       cin>>temp[i];    }

   int *sorted = sortArray(temp, n);

   cout<<"The sorted temperature in ascending order: ";

   for( int i = 0; i < n; i++ ) {  cout << *(sorted + i) << " ";   }

   cout<<endl;

   float ave = average(temp,n);

   cout<<"Average Temperature: "<<setprecision(2)<<ave<<endl;

   cout<<"Highest Temperature: "<<*(sorted + n - 1)<<endl;

   cout<<"Lowest Temperature: "<<*(sorted + 0)<<endl;

   return 0;

}

Explanation:

See attachment for complete source file with explanation

Computer data that is suitable for text​

Answers

Answer:

Answer:Data Types. Computer systems work with different types of digital data. In the early days of computing, data consisted primarily of text and ...

Other Questions
if you roll a single die and get 4 fives in a row what is the probability that you would get a 5 on the next roll When sales of a particular hybrid automobile reach 60,000 units, federal income tax credits begin to phase out. One year after reaching this threshold, buyers are still eligible for 25% of the original $3000 credit. What tax credit would buyers receive if they purchased the vehicle at this time. what three cognitive skills that develop during puberty? (1) She said to him " What is your name?" (into indirect speech ) Select the correct answer. Read this excerpt from the Declaration of Independence. Then answer the question that follows. We hold these truths to be self-evident that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. That to secure these rights, Governments are Instituted among Men, deriving their Just powers from the consent of the governed. Based on the excerpt, why do you think the Founding Fathers supported the idea of a limited government? A. They believed that it was the government's duty to fulfill the people's wishes. B. They wanted people to follow government laws and policies without conflicts. C. They felt that a limited government would reduce public revolutions and uprisings. D. They hoped to win foreign approval by following the limited government model. Find the x and y intercept for the equation: = 4 2. Define the term criminology by explaining its definitional element? An astronaut on a distant planet wants to determine its acceleration due to gravity. The astronaut throws a rock straight up with a velocity of 19 m/s and measures a time of 24.4 s before the rock returns to his hand. What is the acceleration (magnitude and direction) due to gravity on this planet What is the answer to this question please tell me this 3 4 5 blank The blank is the accepted form of gathering and reporting information within the science community. 10:38 Fri 9 JulESGCSE Science - Chemistry2 of 15Name the indicator that is red in acid and turns green when the solution becomes neutral.| can someone please help me with my math assignment??? really need the answer today. And also please don't answer this if you didn't know or for just points Which statement best expresses the main idea of the passage below?Peru has three distinct geographic regions: Cold, mountainous Sierra Dry coastal plain Warm, forested selvaThe ways people live in these regions are very different. For example, many people on the coastal plain live in cities, while most people in the Sierra live in small villages. A. Perus Sierra is mountainous and cold B. Perus geography affects the lives of its people. C. There are no cities in Perus Sierra region. D. Perus geography is not varied. Qu se debe hacer para mantener la salud? Usa mandatos (commands) formales o informales. What geographical feature contributed to why North Africa developed so differently from southern Africa? Okay so this isnt for homework, I was just curious. Lets say there is a 50-50 senate and the VP is an independent and does not caucus with a particular party. What happens? Also, I searched the internet and couldnt find anything. Thank you! Which scenario best illustrates Dwight D. Eisenhower's concerns about themilitary-industrial complex in the United States? Spanolia LLC is estimating its WACC. Its bonds have a 12 percent coupon, paid semiannually, a current maturity of 20 years, and sell for 1,000 USD. The firm's marginal tax rate is 40 percent. What is the after-tax cost of debt? Answer in % terms to 2 decimal places w/o the % sign. Can someone help me with this math homework please!