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
bekas [8.4K]
3 years ago
6

Find the largest number. The process of finding the maximum value (i.e., the largest of a group of values) is used frequently in

computer applications. For example, an app that determines the winner of a sales contest would input the number of units sold by each salesperson. The sales person who sells the most units wins the contest. Write pseudocode, then a C# app that inputs a series of 10 integers, then determines and displays the largest integer. Your app should use at least the following three variables:
Counter: Acounter to count to 10 (i.e., to keep track of how many nimbers have been input and to determine when all 10 numbers have been processed).
Number: The integer most recently input by the user.
Largest: The largest number found so far.
Engineering
1 answer:
salantis [7]3 years ago
8 0

Answer:

See Explanation

Explanation:

Required

- Pseudocode to determine the largest of 10 numbers

- C# program to determine the largest of 10 numbers

The pseudocode and program makes use of a 1 dimensional array to accept input for the 10 numbers;

The largest of the 10 numbers is then saved in variable Largest and printed afterwards.

Pseudocode (Number lines are used for indentation to illustrate the program flow)

1. Start:

2. Declare Number as 1 dimensional array of 10 integers

3. Initialize: counter = 0

4. Do:

4.1 Display “Enter Number ”+(counter + 1)

4.2 Accept input for Number[counter]

4.3 While counter < 10

5. Initialize: Largest = Number[0]

6. Loop: i = 0 to 10

6.1 if Largest < Number[i] Then

6.2 Largest = Number[i]

6.3 End Loop:

7. Display “The largest input is “+Largest

8. Stop

C# Program (Console)

Comments are used for explanatory purpose

using System;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int[] Number = new int[10];  // Declare array of 10 elements

           //Accept Input

           int counter = 0;

           while(counter<10)

           {

               Console.WriteLine("Enter Number " + (counter + 1)+": ");

               string var = Console.ReadLine();

               Number[counter] = Convert.ToInt32(var);

               counter++;                  

           }

           //Initialize largest to first element of the array

           int Largest = Number[0];

           //Determine Largest

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

           {

               if(Largest < Number[i])

               {

                   Largest = Number[i];

               }

           }

           //Print Largest

           Console.WriteLine("The largest input is "+ Largest);

           Console.ReadLine();

       }

   }

}

You might be interested in
the coil polarity in a waste spark system is determined by the direction in which the coil is wound (left hand rule for conventi
zaharov [31]
The coil polarity in a waste-spark system is determined by the direction in which the coil is wound (left-hand rule for conventional current flow)and can’t be changed. For example, if a V-8 engine has a firing order of 18436572 and the number 1 cylinder is on compression, which cylinder will be on the exhaust stroke?
3 0
2 years ago
(True/False) Unix is written in the C language. *<br> True<br> O False
Katarina [22]

Answer:

false

Explanation:

8 0
2 years ago
Read 2 more answers
technician a says that dirt bypassing the filter on many common rail injectors can cause an injector to stick open and continuou
NNADVOKAT [17]

Technician a is correct because he says that Many common rail injectors filters can be bypassed by dirt, which can lead to an injector sticking open and continuously fueling a cylinder.

Coalescence is used to separate the water and fuel. To the fuel injector cleaning kit, fasten your air compressor. Diesel engines run at compression ratios that are greater than those of gasoline engines. greater ratio compared to gasoline engines. increased thermal expansion as a result. more fuel energy that is transformed into usable power. The great benefit of using a dry cylinder sleeve is that by quickly installing new sleeves, the cylinder block can be quickly restored to its original specifications. Vacuum drying can be used to get rid of small amounts of water. A nozzle is used to spray the fuel into the vacuum chamber of engines. Air and unsolved free water are taken out of the oil. The fuel is evenly dispersed, which facilitates efficient drying.

Learn more about injectors here:

brainly.com/question/27969202

#SPJ4

3 0
1 year ago
A cold storage room is used to keep the temperature inside the room maintain at low temperature.
lianna [129]

Answer:

The power of the brick wall it may be how the soiled ness of the wall too keep in the cold

Explanation:

5 0
3 years ago
Read 2 more answers
Refrigerant-134a at 700 kPa, 70°C, and 7.2 kg/min is cooled by water in a condenser until it exists as a saturated liquid at the
alex41 [277]

Answer:

The mass flow rate of cooling water required to cool the refrigerant is 123.788\,\frac{kg}{min}.

Explanation:

A condenser is a heat exchanger used to cool working fluid (Refrigerant 134a) at the expense of cooling fluid (water), which works usually at steady state. Let suppose that there is no heat interactions between condenser and surroundings.The condenser is modelled after the First Law of Thermodynamics, which states:

\dot Q_{ref} - \dot Q_{w} = 0

\dot Q_{ref} = \dot Q_{w}

\dot m_{ref}\cdot (h_{ref, in} - h_{ref,out}) = \dot m_{w}\cdot (h_{w, out} - h_{w,in})

The mass flow rate of the cooling water is now cleared:

\dot m_{w} = \dot m_{ref }\cdot \frac{h_{ref,in}-h_{ref,out}}{h_{w,out}-h_{w,in}}

Given that h_{ref,in} = 808.34\,\frac{kJ}{kg}, h_{ref, out} = 88.82\,\frac{kJ}{kg}, h_{w,out} = 104.83\,\frac{kJ}{kg} and h_{w,in} = 62.98\,\frac{kJ}{kg}, the mass flow of the cooling water is:

\dot m_{w} = \left(7.2\,\frac{kg}{min} \right)\cdot \left(\frac{808.34\,\frac{kJ}{kg}-88.82\,\frac{kJ}{kg} }{104.83\,\frac{kJ}{kg}-62.98\,\frac{kJ}{kg} } \right)

\dot m_{w} = 123.788\,\frac{kg}{min}

The mass flow rate of cooling water required to cool the refrigerant is 123.788\,\frac{kg}{min}.

4 0
3 years ago
Other questions:
  • Volume of sale (i.e., the number of parts sold) is a factorwhen determining which
    8·1 answer
  • In engineering, economic cost is a decision-making tangible factor. Group of answer choices True False
    12·2 answers
  • What engine does the Lexus is300 have?
    5·1 answer
  • The phrase "positive to positive, negative to ground" is correct when jump starting a car.
    9·1 answer
  • In normal operation, a paper mill generates excess steam at 20 bar and 400◦C. It is planned to use this steam as the feed to a t
    14·1 answer
  • The diffusion coefficients for species A in metal B are given at two temperatures:
    12·1 answer
  • In casting experiments performed using a certain alloy and type of sand mold, it took 170 sec for a cube-shaped casting to solid
    11·2 answers
  • What is the angular velocity (in rad/s) of a body rotating at N r.p.m.?
    13·1 answer
  • Pleaseeee help me with this!!
    10·1 answer
  • How to change a fuel fiter
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!