1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Taya2010 [7]
3 years ago
12

write a program that prompts the user to enter 10 integers. Then find the sum, max, and min of those 10 intergers.

Computers and Technology
1 answer:
xenn [34]3 years ago
8 0

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

   int a[10],sum=0,max=INT_MIN,min=INT_MAX;

   cout<<"Enter 10 integers"<<endl;

   

   for(int i=0;i<10;i++)//taking input..

   {

       cin>>a[i];

   }

   for(int i=0;i<10;i++)//loop for finding the sum,maximum and minimum.

   {

       sum=sum+a[i];//calculating sum..

       if(a[i]>max)//condition for maximum..

       {

           max=a[i];

       }

       if(a[i]<min)//condition for minimum..

       {

           min=a[i];

       }

   }

   cout<<"The sum of the integers is "<<sum<<endl

   <<"The maximum integer is "<<max

   <<endl<<"The minimum integer is "<<min<<endl;  //printing the sum,maximum,minimum.

return 0;

}

Output:-

Enter 10 integers

2 54  8 56 2 1 78 20 90 125

The sum of the integers is 436

The maximum integer is 125

The minimum integer is 1

Explanation:

I have taken an integer array of size 10 and initialized sum with 0 max with minimum value possible and min with maximum value possible.

First loop is to take input from the user.

The next loop find the sum,maximum and minimum.

Then printing the sum,maximum and minimum.

You might be interested in
An engineer created three VSANs on the Cisco MDS switch. VSAN 100 is allocated to the marketing department, VSAN 110 is allocate
SCORPION-xisa [38]

Answer:

Option B i.e., mdsswitch# show Vsan membership is the correct option.

Explanation:

The following commands is used by the engineer because it displays the membership of the VSAN( virtual storage area network).

switch# command is used to enter the configuration mode. So, the engineer using the following commands to verify that the interfaces for the research department.

7 0
4 years ago
What can Strings store
horsena [70]
A string is generally considered as a data type and is often implemented as an array data structure of bytes (or words) that stores a sequence of elements, typically characters, using some character encoding. String may also denote more general arrays or other sequence (or list) data types and structures.
5 0
4 years ago
Read 2 more answers
Which of the following information is okay to share on social networking site?
zvonat [6]
C. Your hobbies and interests
4 0
4 years ago
Read 2 more answers
Illustrate why Sally's slide meets or does not meet professional expectations?
givi [52]

The correct answer to this open question is the following.

Unfortunately, you did not provide any context or background about the situation of Sally and the problem with her slides. We do not know it, just you.

However, trying to be of help, we can comment on the following general terms.

When someone does not meet professional expectations, this means that this individual did not prepare her presentation, lacked technical skills, did not included proper sources, or missed the proper visual aids to make the presentation more attractive and dynamic.

What Sally can improve about her slides is the following.

She can design a better structure for the presentation to have more congruence.

Sally has to clearly establish the goal or goals for her presentation.

She has to add many visuals instead of plain text. This way she can better capture the interest of her audience.

If she can use more vivid colors instead of pale or dark ones, that would be best.

No paragraphs unless necessary. She better uses bullet points.

Take care of the tone of her voice. During her practice, she can record her vice to check how it sounds.

5 0
3 years ago
What is the purpose of a div?
taurus [48]

Answer:

I'd choose A, all of the above.

Reasoning Why:

I'll be taking you on a step to step process on why I inputted the answer.

The <div>, is basically like a container that you can group tougher, why this is great is because you can edit the div using a background-color effecting that group such as the following..

EXAMPLE OF BACKGROUND-COLOR DIV (background-color)

<!DOCTYPE html>

<html>

<head>

<title>Brainly Example | HTML Div</title>

<style>

#byexample{

background-color:red;

/*Example of the Background-color attrib*/

/*You can also use the background-image attrib, however I recommend you checkout W3Schools, on that topic.*/

}

</style>

</head>

<body>

<div id="byexample">

<p>Just some random text to demonstrate.</p>

</div>

</body>

</html>

END OF EXAMPLE

You can also, in the <div> change multiple styles of an element in the div. However, if do want to change the styles of a single element you would need to nest it.

<!DOCTYPE html>

<html>

<head>

<title>Brainly Example | HTML Div</title>

<style>

#byexample #text{

background-color:red;

color:yellow;

}

</style>

</head>

<body>

<div id="byexample">

<p id="text">Just some random text to demonstrate.</p>

</div>

</body>

END OF EXAMPLE

Lastly, you can group elements using divs, as stated in openclassroom (website).

Anyways, I hope this helped!

Happy coding!

5 0
3 years ago
Other questions:
  • In a PERT network, non-critical activities that have little slack need to be monitored closely
    14·1 answer
  • You use the _____ sheet in the format cells dialog box to position data in a cell by centering it, for example.​
    8·1 answer
  • Principles of defensive driving include:
    15·1 answer
  • All of the following are forms of verbal communication except
    12·2 answers
  • To draw a clustered cylinder chart, first select the data to be charted and then click the column button (insert tab | charts gr
    13·1 answer
  • Within the try clause of a try statement, you code a. all the statements of the program b. a block of statements that might caus
    14·1 answer
  • Which of the following laptop features allows users to overcome keyboard size restrictions?
    11·1 answer
  • PLEASE HELP QUICK WILL GIVE BRAINLY
    6·1 answer
  • Which relation is created with the primary key associated with the relationship or associative entity, plus any non-key attribut
    6·1 answer
  • This Command to insert copied text anywhere in your document
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!