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
adell [148]
3 years ago
15

Code and test this exercise in Visual Studio, then upload your Source.cpp file for checking.

Computers and Technology
1 answer:
fredd [130]3 years ago
6 0

Answer:

Check the explanation

Explanation:

#include <iostream>

#include<vector>

using namespace std;

int main()

{

//declaration

vector<double> weights;

double weight,totalWeight=0,avgWeight,maxWeight;

//reading data from console

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

{

cout<<"Enter weight "<<i+1<<": ";

cin>>weight;

weights.push_back(weight);

}

//caliculating max total and average weight and printing the weights

maxWeight=weights.at(0);

cout<<"You entered: ";

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

{

totalWeight+=weights.at(i);

if(weights.at(i)>maxWeight)

maxWeight=weights.at(i);

cout<<weights.at(i)<<" ";

}

avgWeight=totalWeight/5.0d;

cout<<"\nTotal weight: "<<totalWeight<<endl;

cout<<"Average weight: "<<avgWeight<<endl;

cout<<"Max weight: "<<maxWeight<<endl;

return 0;

}

OUTPUT:

You might be interested in
How do you take a screen shot on hp pavilion dm3
drek231 [11]
Press and hold down the "Fn" button while pressing the "Home Prt Sc" button above the numeric keypad to capture the entire screen. Make a screenshot of the active window only by holding down the "Fn" and Alt" keys while pressing "Home Prt Sc." 2. Press the "Start" button, and type "Paint" into the search box.
5 0
4 years ago
Is ryan patrick cullen gay
pshichka [43]

who is that? ..........

6 0
3 years ago
Read 2 more answers
What command would you use to copy the content of a file named report1 to another called report1uc. Convert the content of repor
Ray Of Light [21]

Answer:

Answered below.

Explanation:

This answer is applicable to Linux.

There are several commands for copying files in Linux. cp and rsync are the most widely used. cp though, is the command used to copy files and their contents.

To copy a file named report1.txt to another file named report1uc.txt in the current directory, the following command is run.

$ cp report1.txt report1uc.txt

You can change the case of the strings in the file by using the tr command.

tr [:lower:] [:upper:]

For example,

$ echo brainly | tr [:lower:]. [:upper:]

Result is BRAINLY.

7 0
3 years ago
WILL MARK YOU BRAINLIEST :
valkas [14]

CodeHS is an interactive online learning platform offering computer science and programming instruction for schools and individual learners.

CodeHS is focused on spreading access to and knowledge of computer science by offering online instructional materials supported by remote tutors.

Explanation:

Downloading an image from a website on the internet.

  • Right-click the image.
  • Choose the command Save Picture As. The command might be different in browsers other than Internet Explorer.
  • Use the Save Picture dialog box to find a location to save the picture. You can rename the picture as it's saved to your computer's storage system
  • Click the Save button.

Download an image of Karel the dog from the URL

  • Create a folder in your laptop
  • Place your text file of images URL in the folder.
  • cd to that folder.
  • Use wget -i images.txt.
  • You will find all your downloaded files in the folder.

How your computer finds the CodeHS server, requests information from the server, and receives it.

  • When you enter an URL into the address bar of browser, browser will send the domain to a server call DNS to convert the domain into IP address.
  • For example: google dot com will be convert into 113.171.253.224
  • Next, the browser will send your request to that IP.
  • All your sent data will be divided into packages, each package contains your IP address.
  • That is the reason why server know who it will send the response.
3 0
3 years ago
You create a database that stores data in tables that consist of rows and columns. each row has a primary key, and each column h
jeyben [28]
The answer is a relational database.

A data model in database management system consists of rules that define how the DB organizes data. Today, a relational database is widely used. It is a collection of data items organized as a set of formally described tables from which data can be accessed in many different ways.



3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a shell (text-based) program, called sum_second.py, that opens a text file called stuff.txt with 2 numbers per line separa
    8·1 answer
  • A program called the ______ combines the object program with other programs in the library and is used in the program to create
    5·1 answer
  • Writenames of eight output device.​
    8·1 answer
  • We never need to use a forward declaration when invoking a public subprogram. true or false?
    15·1 answer
  • When designing a suitable and safe flexibility training program, you should set reasonable and appropriate goals depending on wh
    15·1 answer
  • What is the TAG to begin a Web page, as recommended by the W3C?
    13·1 answer
  • A _____ refers to a product or service, such as a technical report, a training session, a piece of hardware, or a segment of sof
    12·2 answers
  • Which type of protocol allows for a secure data transmission using encryption methods?
    7·1 answer
  • ¿Cuál es la diferencia entre una plataforma educativa y una tutoría?
    7·1 answer
  • WILL GIVE BRAINLIEST! The command simplify is used if you only want the first two digits of a decimal to appear in the interpret
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!