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
Alex
3 years ago
10

Write a C++ program using a do while loop for (Find the highest score). The program should work for any number of students. Run

the program for 3 cases:
Computers and Technology
1 answer:
alexdok [17]3 years ago
8 0

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    int highest = 0;
  6.    int score;  
  7.    do{
  8.        cout<<"Input a score: ";
  9.        cin>>score;
  10.        
  11.        if(score > highest){
  12.            highest = score;
  13.        }    
  14.    }while(score >= 0);
  15.    
  16.    cout<<highest;
  17.    return 0;
  18. }

Explanation:

Firstly, create a variable highest and initialize it with zero (Line 5). Next, create a do while loop (Line 7 - 14). Within the loop prompt user to input a score (Line 8-9) and if the current score is higher than the highest variable, assign the score to highest variable (Line 11 - 13).

After finishing the loop when user put in any negative value, the program shall be able to print out the highest input score (Line 16).

You might be interested in
Points!!!!!!!! pls help
siniylev [52]
D. Rasterize

This answer makes the most since
7 0
3 years ago
Read 2 more answers
What are 3 examples of Chassis Wiring?
Roman55 [17]

Answer:

.

Explanation:

5 0
3 years ago
Interviews should never feel like an_________Instead, they should feel like a________
Rainbow [258]

Answer:

blank 1: interrogation

blank 2: getting to know

Explanation:

4 0
3 years ago
This is a random question, it’s not about computers or technology
ivann1987 [24]

Answer:

Explanation:

There’s only an AngelKittenn583

To delete in an account ,you must sign into it with the email and password, go into your setttings, and find the “Delete Account” Button

4 0
3 years ago
2. A host computer with an IP address of 172.16.29.155 using a subnet mask of 255.255.255.0 and a gateway of 172.16.29.1 pings a
ASHA 777 [7]

Answer:

From the host IP address and subnet mask, you can tell that both computers are on the same network. Host 172.16.29.155 will need to send an ARP request broadcast for 172.16.29.83 to get the MAC address and update its ARP table if the host 172.16.29.83 has not already done so.

Explanation:

<h2>ADDRESS RESOLUTION PROTOCOL (ARP)</h2>

Address Resolution Protocol (ARP) is a procedure for mapping a logical address known as the IP address to a physical address known as MAC (Media Access Control) address in a local area network. The job of the ARP is essentially to translate 32-bit addresses to 48-bit addresses and vice-versa when using IP Version 4 (IPv4) to communicate on the network.

Most of the computer programs/applications use logical address (IP address) to send/receive messages, however, the actual communication happens over the physical address (MAC address) this happens in the layer 2 of the OSI model. An ARP request is a broadcast, and an ARP response is a Unicast.

Scenarios when ARP is used:

Scenario-1: The sender is a host and wants to send a packet to another host on the same network.

·        Use ARP to find another host’s physical address

Scenario -2: The sender is a host and wants to send a packet to another host on another network.

·        Sender looks at its routing table.

·        Find the IP address of the next-hop (router) for this destination.

·        Use ARP to find the router’s physical address

Scenario -3: the sender is a router and received a datagram destined for a host on another network.

·        Router checks its routing table.

·        Find the IP address of the next router.

·        Use ARP to find the next router’s physical address.

Scenario -4: The sender is a router that has received a datagram destined for a host in the same network.

·        Use ARP to find this host’s physical address.

The situation in the question above falls under scenario-1. From the host IP address and subnet mask, you can tell that both computers are on the same network. Host 172.16.29.155 will need to send an ARP request broadcast for 172.16.29.83 so to get the MAC address and update its ARP table if the host 172.16.29.83 has not already done so.

7 0
4 years ago
Other questions:
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
  • Your network administrator finds a virus in the network software. Fortunately,
    13·1 answer
  • Data arranged and stored in a data set
    9·1 answer
  • A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county s
    11·1 answer
  • Which function can you perform on a word processor but not on a typewriter?
    15·2 answers
  • Amazon Web Services and Microsoft Azure are some of the most widely used _______.
    7·1 answer
  • Peripeteia is also referred to as __________.
    5·2 answers
  • You are reviewing the output of the show interfaces command for the Gi0/1 interface on a switch. You notice a significant number
    12·1 answer
  • Assume that class BankAccount exists, and that it has a constructor that sets the private field balance, and that setBalance and
    13·1 answer
  • Does the security burden fall primarily on the user? On
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!