Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the student with the highest score (display the student's name and score). Also calculate the average score and indicate by how much the highest score differs from the average. Use a while loop.

Answers

Answer 1

Answer:

Follows are the code to this question:

#include <iostream>//defining header file

using namespace std;

int main()//defining main method

{

int n,s=0,j,number,h=-1;//defining integer variables

string name, nh;//defining string variable

float avg;//defining float variable

cout<<"Enter the number of students: ";//print message

cin>>n;//input value in n

while (j< n) //defining loop for input value

{

getline(cin, name);//use getline method to input value

cout<<"Enter the student name: ";//print message

getline(cin, name);//use getline method to input value

cout<<"Enter the score: ";//print message

cin>>number;//input number value

s+= number;//add numbers into s variable

if(h<number)//defining if block that checks h is greater then number

{

nh= name;//use string variable nh to store name value

h= number;//use integer variable h to store name value

}

j++;//increment j value by 1

}

cout<<name<<endl;//print highest name value

cout<<"score: "<<h<<endl;//print highest score value

avg = (float)s/(float)n;//calculate the average value

cout<<"Average is: "<<avg<<endl;//print average value

cout<<"Difference: "<<(h-avg)<<endl;//print average difference

return 0;

}

Output:

please find attached file.

Explanation:

In the above code, inside the main method four integer variable "n,s,j, number, and h", two string variable "name and nh" and one float variable "avg" is defined.

In the next step, n is defined that is used for the input value. and Inside the main method, a while loop is defined, which uses the "getline" method to the input value, and use s variable to add all numbers.

In the next step, if a block is defined that checks "h" is greater than the number value if the condition is true, it will print the highest value of the input variable and its average difference.

Write A Program That Prompts The User To Enter The Number Of Students And Each Student's Name And Score,

Related Questions

Sorry to bother you guys but for some reason it wont let me comment. How can i fix this?

Answers

Explanation:

I would just say close the app and come back in after

Answer:

refresh it or go out and go back in if that dosnt work you can

always restart whatever you use to get on :P

Explanation:

Hi! I'll mark brainliest if you can help me with my problem!
What do I do if I have a computer stuck in a automatic repair loop/boot loop? Please help asap

Answers

Answer:

1. Click Repair your computer at the bottom.

2. Choose Troubleshoot>Advanced Options>Command Prompt.

3. Type chkdsk /f /r C: and then press Enter.

4. Type exit and press Enter.

5. Restart your PC to see if the problem is fixed or not.

Answer:

So first you would try shutting it off or restarting it then if it doesn't work press automatic restart.

Explanation:

If this doesn't help contact a person at best buy wor whatever. Im sorry if this sounds rude in anyway. :(

What is Hypertext Transfer Protocol?

Answers

Answer:

an application layer protocol for distributed, collaborative, hypermedia information systems.

Explanation:

what is amoeba cell do? max amount of points so pls answer​

Answers

Answer:

Ameoba is an organism which is unicellular and is a free-living cell. it is also a eukaryotic organism ( it has well-defined, membrane-bound cell organelles).

An amoeba cell has to carry out all the functions needed for its survival such as injection of food, digestion of food, excretion of waste, etc

An Amoeba cell is a unicellular organism. It is eukaryotic and has well-defined, membrane-bound cell organelles. Amoebas function as their own living body, so they create energy, move around, and throw out waste on their own.

Software as a Service refers to

software that you put on your computer.

software you can access using any device.

a server.

a web browser.

Answers

Answer:a,b,d,e

Explanation: The other top ones are right but it's a multiple choice answer

Which of the following is not expected of employees’ oral communication skills in the workspace

Answers

Answer:

Yes, choose C since it's not an oral requirement, but a written one.

The oral communication skills in the workspace should not involve writing.

The information regarding oral communication skills is as follows:

Active listener.Clarification.Asking open-ended questions.In this, the communication could be done in a clear way.The appropriate language should be used.Also, the laws & regulations should be communicated.

Therefore we can conclude that the oral communication skills in the workspace should not involve writing.

Learn more about the communication here: brainly.com/question/12349431

What file format is used to help prevent other people from editing a final document?
RTF
TXT
PDF
PWP

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is PDF.

Because PDF file format does not allow you to edit something in it. It prevenst others from editing in it. In a PDF file, you cannot add text, pictures, etc as like in a word document.

Why other options are not correct.

In RTF (rich text format) and TXT file format, you can easily edit the content in these file formats. Furthermore, RWP  files are the storage of the contents of these RapidWeaver websites. All the website contents are saved using this format that includes information about images, pages and style sheets, etc, and information in it can be easily editable.

Jonathan works with a team of graphic designers. They have a collection of images and have divided the image editing work among them. They have their individual computers to work with. Jonathan suggests that the storage device for sharing their work should be of the plug-and-play type. Which storage device is he talking about?
A.
USB drive
B.
CF card
C.
SD card
D.
MMC

Answers

Answer:

A, USB

Explanation:

Here are a few elements of breaking news and a feature story. Match the elements of breaking news and a feature story with their correct images.

Answers

Breaking News:

➡️Highlights key events

➡️Answers some, but not necessarily all questions, such as when, where, who, why, and how.

Feature Story:

➡️ No urgency to be reported

➡️Adequate time for research

➡️Includes reviews and Q&A type interviews

➡️Summary lead is the most traditional form often used to create a script

Explanation:

Breaking news is known as a special report or news which reports something current and urgent. It usually interrupts a scheduled program or current news. It answers some questions on the news that just broke out.

Feature story is known to be a news that is non-fiction. It is also known to be a type of soft news. It includes Q&A interviews and reviews. It takes adequate time for research.

Breaking News

Highlights Key eventsIncludes Reviews and Q&A type interviewsAdequate time for research

Feature story

Answers some , but not necessarily all questions , such as when , where , who , why , and howNo urgency to be reportedSummary lead is the most traditional form often used to create a script.

Suppose you have a word processing application on your smartphone, your tablet, and your laptop. You are at home, and you need to write a paper for a class. A would be easiest to use for writing your paper.

Answers

Answer:

laptop

Explanation:

have a good day

I need help plz
so right now im on my school computer and everytime i turn it on it shows this blue site and on the site it says something like anti-virus-protection. I dont need virus protection cause im on my school computer, then whenever i turn on chrome it closes the page i was on and then brings it bk on does anyone know what is happening or can help me???


ALSO ALL my extension that are not to help me with school are deleted

Answers

Answer:

Try to restart your computer, if it doesn't work try looking up what to if anti-virus protection comes up randomly, without needing it.

Explanation:

Not Sure if you'll still get it even after restarting, but if it doesn't then hard shutdown the computer, So it could refresh it.

try turning it off and back on or u can wait till the battery drains out

A database record can best be described as:
А
a collection of data about a limited topic, organized into rows and columns.
B
a collection of data that can be sorted and searched using search algorithms.
С
a category of information in a table.
D
a collection of information consisting of one or more related fields about a specific entity.

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

The correct option to this question is D.

A database record can be best described as the collection of information consisting of one or more related fields about a specific entity. Because a database record represents a record about a specific entity for example a student record studying in a school. A student is a specific entity in the database and it has one or more related fields, for example, name, class, courses in which enrolled etc.

others options are not correct because:

A: a database record is a collection of data about a specific entity and it is not about a limited topic.

B: all database records can be sorted and searched using search algorithms but it is not necessarily because you can search data sometimes using quarries etc.

C: a database record is not a category of information in a table but it is a collection of one or more related field about a specific entity.

Answer:

c

Explanation:

Maisy is an aspiring video game programmer. She has some unique ideas for new video games, but first, she needs to get some computer equipment at home. Currently, she owns a smartphone and tablet, but she wants to invest in a desktop computer and some peripherals.

Write a paragraph suggesting at least five pieces of hardware that Maisy should consider purchasing. Make sure to justify why she needs each piece of equipment by describing what tasks they will perform. Also explain how those different pieces of hardware will be installed.

Answers

Answer:

She does not need a computer all she needs are a good laptop that could handle a game engine and a graphic drawing tablet to make the terrain and characters.

Explanation:

It also depends on what kind of game you want to create

Kerry is debugging a program. She identifies a line of code to begin execution and a line of code to end execution so that she is only running part of the computer program. Which is she using?
a.variable inspections
b.breakpoints
c.stepping functions
d.line-by-line search

Answers

Answer:

I think it's B on Edge, breakpoints

Explanation:

Answer:

B

Explanation:

4. How could you apply some of the ideas, principles, or structures of coding to fields of study, industries, or tasks outside of creating computer programs? Propose at least one way to use "coding" or creating programs outside of computer science and explain how it uses coding-related concepts.

Answers

Answer:

a production plant

Explanation:

"Coding" brings with it a linear way of thinking and problem solving, where one step needs to be taken before moving on to the next step. This can be applied to a wide range of real-life scenarios and industries. For example, a production plant starts with an initial input, that input is taken and used in a set of instructions (method), those instructions take that input and create a new output. Once the new output is created it is then passed on to another set of instructions that takes that output as an input to create a new output. Just like a computer program, a power plant repeats this process in order to a fully working and realized product.

How to build aeroplain pls tell me I want to go to amereeca

Answers

Answer:

lol i think it would be cheaper to but a ticket or drive there

In a paragraph of 125 words, describe the benefits of having an electronic résumé.

Answers

Answer:

Employers benefit from the advantages online resumes offer, including having access to a host of possible applicants based on specific search criteria and limiting their search to applications that possess the exact skills and qualities they are looking for.

Answer:

There are numerous advantages to creating an online resume. Companies themselves are increasing their use of online services because they offer significant cost savings over traditional hiring methods. As such, many industries and government organizations will now specifically ask job seekers to post their resumes online in a specific format (e.g., MS Word, HTML, or PDF), either by uploading them from another location or recreating them on their website.

     However, the main advantage of online resumes is that they are instant; sending a resume through the mail is likely to take days, and if a company needs to hire someone fast, or are looking for temporary or freelance work, they're unlikely to go to the trouble to post an advertisement, wait for resumes to arrive, and then sort through them.

     Companies will instead be looking for a speedy solution, and having an online resume immediately opens up these avenues to you.

     Keeping your resume online also allows you to instantly update your resume with your most recent achievements, even notifying potential employers of this update if they are considering your resume.

Explanation:

WILL GIVE BRAINLIEST FOR CORRECT ANSWER

Which prototyping tool has a feature to turn your paper sketches into mockups?
A.
Justinmind
B.
Marvel
C.
Origami
D.
InVision

Answers

Answer: origami studio

QUESTION 2 / 10
Which of the following is the BEST rearn to use cash for making purchases
B. Getting more cash from an ATM machine is easy to do
A. Splitting bills with friends is entier,
D. Knowing what you have spent your money on is
simple,
C. Keeping track of how much you have spent is simple.
Achete Wing
Go to Semings to

Answers

Answer:

C. Keeping track of how much you have spent is simple.

Explanation:

One of the best reasons to use cash for purchases is to help one track how much he/she spends. When one uses cash for purchases, it helps to keep him/her in check on how much he/she spends daily.

This helps individuals to cut down, control and watch over their spendings. Actually, when you see the cash you own, it can remind you to spend less because your overall money with you is in reality.

Which of the following devices can send or receive
information on a network? Check all of the boxes
that apply.
O printers
e-book readers
clients
servers
smartphones

Answers

Answer:

All

Explanation:

Answer:

Its all  of them

Explanation:

I got it right

In Word, tables can be styled much like text can.
True
False

Answers

Answer:

True

Explanation:

There are many formatting options from color, size, and many more.

Hope this helps!

How Do I connect my apple keyboard to my computer? BTW it's saying that cannot connect to the device.

Answers

Answer:

try the bluetooth one

Explanation:

hope it works

Try with Bluetooth connection or else if the keyboard is wireless, one small pen drive like thing they have given so attach it in your computer, it will surely work.

Web developers work part time true or false

Answers

True because I looked it up lol

Answer:

They work 40 hours a week, so yes, you could say that they work part time.

Impersonal communication involves _________________. a. sharing personal information b. trying to become friends c. barriers to developing positive relationships d. both b and c

Answers

Answer:

its ccccccc

Explanation:

Answer:

c took it on e2020 and got 100 on my test

Explanation:

Select the correct answer.
Raveena wants to make changes to a message she posted on an online discussion group. What action must she take?
O A. Delete the original message and post a new one.
ОВ. Delete the first post in the thread and type a new message.
Click a button labeled Edit to edit the message.
OC.
OD.
Enter new text in a box at the bottom of the discussion page.

Answers

Answer:

Click a button labeled edit to edit the message

Explanation:

Maria has designed an app for a shopping mall. She is planning to use Google’s cloud testing facility. What will this facility do?
A.
It will offer actionable insights about users.
B.
It will enable her to manage a staged rollout.
C.
It will test the app on a wide range of physical devices.
D.
It will help her acquire new users.

Answers

Answer:

C I think

Explanation:

Help ASAP!!Choose all the basic elements of algorithms. A.Selection B.Loops C.Flow Charts D.Sequencing E.Combinations F.Iteration

Answers

Answer:

b c d

Explanation:

Answer:

A, C, E, F

Explanation:

Just took the test

Help please I’m on a time limit

Answers

Answer:

4, Im pretty sure. but not 100%

Explanation:

concept about borderless classroom because of technology​

Answers

Answer:

With Borderless Classroom Technology, every student remains a part of the classroom. ... That is to be 'as simple as a light switch' and as effective in lighting the learning experience as educators focused on students, not on technology." Borderless Classroom Technology is an extension of that philosophy.

HAS TO BE RIGHT- GOOGLE TOLD ME

By providing education increasingly interesting as well as collaborative, technologies can indeed benefit pupils. A further explanation is provided below.

Borderless Classroom means allowing the instructor to communicate individual screen among students, learners are encouraged from whatever place to take part throughout the lesson, gives educators and administrators with individual conversation skills, improved administration in classrooms.Enables the instructor to watch what pupils were doing on their dashboards gadgets instantaneously.

Learn more about borderless classrooms here:

https://brainly.com/question/7526791

I will brainlist

LEAN manufacturing is mostly used in automobile
manufacturing?

True or False

Answers

Answer:

True

Explanation:

Answer:true

Explanation:

Other Questions
The insulator is the connection between the grounded circuit conductor and the equipment grounding conductor at the service. which statement its true about a oral tradition help pls! this is ap world history work btw!(i have the sand roads. i have more work too but for right now this would be rlly helpful!)how/why did your trade route emerge? what was the driving force? Write an inequality representing the following phrase:One-tenth of a number h is less than or equal to ten Which example is a trait of an index fossil? Match each subject pronoun to its corresponding verb form. Drag the items on the left to the correct location on theright.nosotroscuentoellos/ellasentiendesyocuentatrepetimosl/ellaentienden Which of these would be a good way to retell the story of a tsunami strike, such as the one described in the 'TsunamiWarning'text you read?a. A timeline would be a good way to retell the c. A map would be a good way to retell the text.text.b. A flowchart would be a good way to retell the d. Both a timeline and flowchart would be a goodtext.way to retell the text Adam Smith is regraded as the father of ____ write a word phrase for x/4-17 Why did Europeans look for sea routes to Asia in the fifteenth century?Choose all answers that are correct.Question 1 options:Explorers were looking for a way to sail around Asia to get to the Americas.Demand in Europe for Asian spices, silk, and other goods had grown considerably.WILL MARK THE BRAILIEST IF WANTEDTraveling overland from Europe to Asia was extremely difficult and hazardous.The Ottoman Turks controlled the Silk Road, which was the main land route from Europe through the Middle East to Asia. What was one of the main reasons American colonists rebelled againstthe British? According to King, the public should focus on...A. the lessons contained in the country's founding documents.B. the conduct of police officers.C. his unjust imprisonment by the Birmingham police.D. the courageous actions of civil rights activists. is the core of an operating system that controls its basic functions.O FreewareO KernelTweakerO Open source 15. Briefly explain how the gel (or DNA fingerprint) is made after DNA has been amplified. 11. A virus has infected a bacteria and inserted its viral DNA into the DNA of thebacterial chromosome. This inserted viral DNA is known as what?A. vNaB . vDNAC. ProphageD. Provirus Need help with Spanish what is the dacimal form of 672.937% Not a question.Sitting here sipping a drink in my pajamas wishing I was smart enough and knew or remembered enough to answer all the questions on here to help people Six times the sum of a number and eight is 18 find the number 20 pounds of pet food for$14.99Find the unit rate?