How to write a C++ program that allows a user to enter their rating of the three movies in the Dark Knight Trilogy and then display each rating entered, the highest rating, the lowest rating, and the average of the ratings??

Answers

Answer 1

The program is an illustration of arrays.

Arrays are used to hold multiple values in one variable.

The program in C++ where comments are used to explain each line is as follows:

#include <iostream>

using namespace std;

int main(){

   //This declares an array of three elements for the three ratings

   int ratings[3];

   //This initializes the sum of the ratings to 0

   int total = 0;

   //The following iteration gets input for the three ratings

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

       cin>>ratings[i];

       //This calculates the sum of all inputs

       total+=ratings[i];

   }

   //This declares and initializes the lowest and the highest ratings

   int lowest = ratings[0], highest = ratings[0];

   //This iterates through the array

   for(int i = 1; i<3;i++){

       //The following if condition determines the lowest rating

       if (lowest > ratings[i]){    lowest = ratings[i];        }

       //The following if condition determines the highest rating

       if (highest < ratings[i]){            highest = ratings[i];        }

   }

   //This prints the output header

   cout<<"The ratings are: ";

   //The following iteration prints the three ratings

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

       cout<<ratings[i]<<" ";   }

   //The prints the highest ratings

cout<<endl<<"Highest: "<<highest<<endl;

   //The prints the lowest rating

   cout<<"Lowest: "<<lowest<<endl;

   //The prints the average rating

cout<<"Average: "<<total/3<<endl;

   return 0;

}

At the end of the program, the ratings entered, the highest rating, the lowest rating, and the average of the ratings are printed.

See attachment for sample run

Read more about similar programs at:

https://brainly.com/question/13261254

How To Write A C++ Program That Allows A User To Enter Their Rating Of The Three Movies In The Dark Knight

Related Questions


how do I turn it on the orange button isn’t working :,)

Answers

Answer:

keep holding it

Explanation:

Hold the button for 30 seconds

What the three factors that AI is using for information gathering



Answer and I will give you brainiliest ​

Answers

Answer:

AI uses accelerometers, infrared, magnetic and other electronic sensors to gather data

When people become more dependent on digital technology in their lives, the potential for data misuse will grow.

Explain the above sentence in your opinion.




Answer and I will give you brainiliest ​

Answers

Answer:

abbjiaj

zzz

Explanation:

uuwuwahsbsbsssiaaivab njw

What is the purpose of a project overview?


to provide specific roles for all of the “little people” working on the project

to provide an “up close” look at the project to the leadership

to provide an “in-depth” look at all of the tasks that will need to be done

to provide a “big picture” of the project to everyone involved

Answers

Answer:

option 3 should be the answer is this helps please give the brainliest award.

Answer: D

to provide a “big picture” of the project to everyone involved

this is the right answer

What type of classroom enable students to attend lectures without being physically present with the teacher?

Answers

The answer is online learning since the virus happens alot of schools have been swtiching to online learning. It doesn't require anyone to be pychically present in class and there alot of platforms to do online learning.

What is the difference between cipher block chaining mode and electronic code book mode?

Answers

ECB (Electronic Codebook) is essentially the first generation of the AES. It is the most basic form of block cipher encryption. CBC (Cipher Blocker Chaining) is an advanced form of block cipher encryption. With CBC mode encryption, each ciphertext block is dependent on all plaintext blocks processed up to that point.

Answer:

ECB (Electronic Codebook) is essentially the first generation of the AES. It is the most basic form of block cipher encryption.

CBC (Cipher Blocker Chaining) is an advanced form of block cipher encryption. With CBC mode encryption, each ciphertext block is dependent on all plaintext blocks processed up to that point.

What the advantages and disadvantages of file sharing to the users​

Answers

Answer:

.....................................

As of 2007, how many concentrated solar power plants did the United States have?

Answers

Answer:

12,718

Explanation:

Hope this helps! Let me know! :)

Write a program that get
the age of 50 people and
display the number of
people that fall under:
1. Baby : 0-5
2. Kids and teenagers: 6-17
3. Adults : 18 and over

Answers

Answer:

people = list(map(int, input().split()))  # gets input and makes them into an integer

for i in range(len(people)):

   if 0 <= people[i] <= 5:

       print('Baby')  # You didn't specify how you want to 'store' the info, but I'm just going to print it out

   elif 6 <= people[i] <= 17:

       print('Teen')

   elif 18 <= people[i]:

       print('Adults')

Explanation:

This is the basic structure of the code. This is written in Python 3x. If you are writing in a different language, then just use the template given to you!

Mikayla is listening to music while she completes research for a school assignment. The input and output devices are able to communicate with each other because the computer has

central processing memory
a central processing unit
random access memory
read-only memory

Answers

Answer:

A central processing unit (CPU)

What agencies are in-charge of implementing the intellectual property code?

Answers

Answer:

List of Government Agencies in-charge of implementing the IPC: - Bureau of Patents. - Bureau of Trademarks. - Bureau of Legal Affairs.

Explanation:

Your answer → - Bureau of Patents -

PERGUNTA 1
Um pesquisador deve escolher o seu método de pesquisa:
a. Pelas facilidades em realizar a pesquisa.
b. Pelas experiências de outros pesquisadores.
c. Pelas especificidades do objeto de pesquisa.
d. Pelas regras dos manuais de pesquisa.
e. Por aquilo que for determinado pela instituição a qual está vinculado.

Answers

Answer:

c. Pelas especificidades do objeto de pesquisa.

Explanation:

É o que eu acho e quem achar diferente ta errado

You must configure a certificate authority on your network to use EFS. True or False?
a. True
b. False

Answers

You do not need to configure a certificate authority on your network to use EFS.

EFS is the short form for Encryption File System. With EFS, users can encrypt their files and folders and even the entire content of a given drive. By encrypting these files and folders, the access to them are restricted and thus increasing, improving and enhancing the security level of the users' data.

In other words, even though there are other ways to restrict access (such as using logon authentication and NTFS file permissions), EFS allows to add another layer of security to data.

To encrypt and decrypt data files and folders in EFS, a certificate authority (CA) could be used. This is however not a requirement. In the case where there is no certificate authority, EFS  will sign a default certificate that will be used for encryption. In other words, EFS will generate its own certificate if none does not exist.

The following are other things to note about EFS

i. EFS uses a public and private key pair to encrypt data.

ii. Users do not need to enable EFS. It is enabled by default.

iii. For EFS to encrypt a file, the NTFS file system must be used.

Since a certificate authority is not required on your network to use EFS, the correct option is:

(b) False.

Read more at: https://brainly.com/question/10410730

А
B
1
Score
2
3
What type of
conditional
formatting was
used in Column B?
55
85
91
35
44
76
4
5
6
7
A. Highlight cells > 65 in red
B. Data bars
C. Color scales
D. Directional Arrow Icon
Set

Answers

Answer:

okay oh my gosh what's going on LOL

Match each term to its definition.

parameter
return value
function

a value that can be passed from a function back to the calling part of a program.

a value that can be passed to a function

a group of instructions that can be used to organize a program or perform a repeated task

Answers

Answer:

Parameter - A value that can be passed to a function

Return Value - A value that can be passed form a function back to the calling part of a program

Function - A group of instructions that can be used to organize a program or perform a reapeated task.

did y’all enjoyed project next phase 3 and The 4 revamped heroes

Answers

Answer:

it was good i liked it

Explanation very good

With working from home now becoming a norm what is an effective network for an organization to secure its internal resources access by employees working from home

Answers

Answer:

Always encrypt data never store anything in plain text someone could use wireshark to pull out a data packet and if the data is not encrypted, expect things to happen.

Please please help I don’t understand this

Answers

Answer:

It is this because yass

Explanation:

And yes

Answer:

Yes it is this because yes

Explanation:it is this because

Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a value for hours worked in a day. The program calculates the hours worked in a five-day week and the hours worked in a 252-day work year. The program outputs all the results.

Answers

Answer:

i think its 2131

Explanation:

c

Research on a latest advancement in computing and discuss its potential or how will it impact our lives in the future

Answers

Answer:

hqiauahhwbbwbwbbssbbs

Of the following options, which is most helpful in developing the effective study habit of staying organized? Keep pens, pencils, and highlighters off the desk. Put all computer files in one folder on the desktop. Store notes for all courses in a single notebook. Use a calendar to keep track of assignment due dates.

Answers

Answer:

use a calendar to keep track of due dates.

Explanation: If you use a calendar all of your assignments will be kept track of and will be organized not causing you to stress or become unmotivated to do any work at all.

Use a calendar to keep track of assignment due dates is most helpful in developing the effective study habit of staying organized. Hence, option D is correct.

What is effective study?

Longer study sessions are less effective than shorter, more concentrated ones. In fact, one of the best study methods is to spread out your studying over a few sessions. During rigorous study sessions, which might last 30 or 45 minutes each, active learning strategies are applied.

Spaced practice, also known as scattered practice, is learning that occurs throughout a number of sessions at various times. Effective study methods can help you feel better about yourself, more competent, and more confident.

They can aid in reducing the pressure brought on by due dates and exams. You might be able to cut down on the amount of time you spend studying and free up more time by strengthening your study habits.

Thus, option D is correct.

For more information about effective study, click here:

https://brainly.com/question/10336207

#SPJ2

What do Virtually all of the 7 million millionaires in the United States do??
Virtually all of the 7 million millionaires in the United States:

never had to think about tomorrow, since they knew they would be rich.

were always thinking ahead.

wanted their money to work for them.

wanted to store their money under the bed.

were looking forward to buying a lot of nice toys.

assumed all sellers were telling the truth.

learned how to make smart decisions by doing their homework.

always paid their cell phone first.

always paid themselves first.

Answers

It is assumed by a lot of people that the life of the people who are very rich is very easy and that they do not have to work so hard. People think that the rich people have always had a bed of roses kind a life for them. But that is not the reality. Rich people also have to work hard to get success in their life and for that they have to think properly and wisely before making decisions in their life. These people have to make a lot of research and do a lot of home work before making decisions and have to think a lot. It is not very easy for them also.

Option 7 is the most apt

but if there can be multiple options, then it would be 2,3,7 and 9

Many people believe that the lives of the wealthy are easy and also that they do not have to work as hard as the rest of us.

7 million millionaires in the United States:

People believe that the lives of the wealthy has always been a bed of roses.

However, this is not the case. Rich individuals must also work hard in order to achieve success in life, and they must think carefully and sensibly before making decisions.

Before making judgments, these folks must conduct extensive study and complete extensive homework, as well as reflect deeply. It's not easy for them either.

So, option '7' is the correct answer to the following question.

Find out more information about 'Judgments'.

https://brainly.com/question/26380040?referrer=searchResults

What are the different ways computers can process information?

Answers

To determine what to do with the instructions, the CPU goes through 4 steps to make sure the program runs without errors. The 4 steps are fetch, decode, execute and writeback.

Input, process, output, and storage are the the different ways computers can process information.


What is a computer?

A computer is a piece of computer components used to handle information or files. Data can be stored, retrieved, and processed by it. Maybe may already be aware of the fact you are able use a desktop to surf the Internet, send emails, type articles, and play online games.

The software directs but really the hardware actually does the information to output execution. Input, process, output, and storage are the four important information processing operations needed for a computerized system to operate.

Input, processing, as well as output are really the three phases of the computer. These stages are carried out by a computer "running" a code. A program comprises a set of detailed instructions that specify how the computer should process input to generate the desired result.

Learn more about computers, here:

https://brainly.com/question/21080395

#SPJ2

cuantos días tiene un año

Answers

Answer: 365 dias

Explanation:

9. These particular machines can be decentralized.

A) Risograph
B) Photocopier
C) Desktop computer
D) Printers

__and__??

Answers

Answer:

A, B

Explanation:

Because the desktop computer and the printers are decentralized, they're connected with another noce in a company.. So I suppose that the Risograph and photocopier isn't decentralized.

Describe about abacus​

Answers

An abacus is a calculation tool used by sliding counters along rods or grooves, used to perform mathematical functions. In addition to calculating the basic functions of addition, subtraction, multiplication and division, the abacus can calculate roots up to the cubic degree.

Answer:

An abacus is a calculation tool used by sliding counters along rods or grooves, used to perform mathematical functions. In addition to calculating the basic functions of addition, subtraction, multiplication and division, the abacus can calculate roots up to the cubic degree.

2) Write down the values ​​for the hue, saturation, and intensity of the red color.

Answers

Answer:

can anyone help me in computer please

SOME PLEASE DO THIS ASAPP!!

Answers

Answer: I think it’s really cool. You don’t have to find someone g m ai l and then write a subject and whatever else. You can just send it like a m ess age. I love how it has the call option because it means that you don’t have to have a nu m ber to call your friends or family. And you can do business em ai l while me s saging whoever you need to instead of going back and forth.  

You can promote your business. You can also promote your video and share your screen. It is also a good way to talk to customers to discuss what you need to. A bunch of people have g m ails and it’s fairly simple to just add your friend and te xt them.  

It might be hard to figure out at first. But when you get used to it its fairly simple. It can also shut down do to a bug and stop working, which makes it even more complicated. You can also get creeps that can hack into your gm a i l and read all of your information. (there is a few words i spaced out bc it wouldnt let me send)

Explanation:

Project Description In this exercise, you are responsible for the design and implementation of a school dismissal database. School personal need a database to determine whether students ride the bus at the end of the school day or if students are pickup by an organization or designated adult. The database will be used by school personal to look-up the names of adults and organizations who have the authority to pick-up students from the school from school. To design the database, you will first review the preliminary design requirements. The preliminary design requirements are minimal and incomplete. Add requirements to complete the design of the database. Describe requirements on this document as indicated by the words, Complete this section of the document. You will use Oracle Data Modeler to create a logical and relational model. Then you will implement your database design as an Oracle database. After the Oracle database is created, reverse engineer the database to the relational and logical models.

Answers

Answer:

school bus for. the students

How can i watch the Loud house FREE with a fire stick ? will mark brainliest :3

Answers

Answer:

cinema you'll have to download it

Other Questions
"I want my photograph taken," I said. The photographer looked at me without . He was a drooping man in a gray suit, with the dim eye of a natural scientist. I began to see that I had done an unwarrantable thing in breaking in on the privacy of this man's scientific with a face like mine. The photographer rolled a machine into the middle of the room and crawled into it from behind. He was only in it a second,just time enough for one look at me,and then he was out again, tearing at the cotton sheet and the window panes with a hooked stick, frantic for light and air. 2 1/4-( -3 5/6) Answer as a mixed number in simplest form, Pls answer this plss It's Friday night and Skyler has been assigned the noble task of baby-sitting Casey, his 2-year old brother. He puts a crash helmet on Casey, places him in the red wagon and takes him on a stroll through the neighborhood. As Skyler starts across the street, he exerts a 52 N forward force on the wagon. There is a 24 N resistance force and the wagon and Casey have a combined weight of 304 N. Construct a free body diagram depicting the types of forces acting upon the wagon. Then determine the net force, mass and acceleration of the wagon. Your friend incorrectly factors the expression15x - 20xy as 5x(3 4xy).-Factor the expression correctly. Plz help me WILL MARK BRAINLIESTplz serious answers only and show work no links or will be reported Which event in a story is most likely the falling action?A. Detective Ramirez gathers clues to solve the case.B. Detective Ramirez receives a medal from the mayor for solving thecase.C. Detective Ramirez hears about a big bank heist.D. Detective Ramirez, at long last, cracks the case. No links plsss :() what is one way that businesses can improve the labor productivity of their workforce through human capital?A) by hiring more worker B) by purchasing new and faster equipment C) by hiring fewer workersD) by offering coverage for mental health graph the linear function. j(x)=-1/3x+5 solve for X. -3 + 6 = 2x - 24a: -30 b: -6 c: 6 d: 30 Two butt joints are tacked together. One has a 1/16 root opening and the other has a 1/8 root opening. Which root opening is larger: 1/16 or 1/8? h(x)=17, x=?H(x)=5x+2I don't know how to find x? Pat/present of mental health equation for $.10 times 30 equals three dollars Does anybody knows where Cocomelon was produced? Please tell the address of where was it produced.... If you tell me the address with proof.. you will get brainliest :DIt is very easy.. just tell the address :) and boom... 20 points is yoursThe more info.. The higher chances of getting brainliest :DIf you have lots of info to share... I beg you to answer this for me.. If you do.. I will send you lots of point, a thanks, and brainliest.Warning: If you just want to steal points.. As an ace member, I will WARN you to stop the non-sense of stealing points :) Which statement best describes why setting the context is important in a narrative essay?A. The context is the only part of the essay that can grab the reader's attention.B. If the context is set properly, a writer does not have to include details in the rest of the narrative essay.C. Setting the context encourages the reader to guess what is going on.D. Setting the context helps the reader understand the time, location, and place of the event. Which two elements are methods of indirect characteristics Can anyone help me with this question? please :) please help!!! due tmrw and I don't understand it :( ASAP PLZ Melissa is driving on the highway at the legal speed of 65 mi/h. She notices there is an accident ahead approximately 200 feet away. Her reaction time is 0.75 of a second. Is she far enough away to bring the car to a safe and complete stop? *Round your answers to 2 places after the decimal! 1 Reaction distance = 2 Breaking distance = 3 Total Stopping Distance = 4 yes or no Where is the water source you would need to filter water?