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
You are given a noninverting 741 op-amp with a dc-gain of 23.6 dB. The input signal to this amplifier is;Vin(t) = (0.18)∙cos(2π(
Vsevolod [243]

Answer:

Output voltage equation is V_{out} (t) = 2.72 \cos (2\pi (57000)t +18.3)

Explanation:

Given:

dc gain A = 23.6 dB

Input signal V_{in} (t) = 0.18 \cos (2\pi (57000)t +18.3)

Now convert gain,

A = 10^{\frac{23.6}{20} } = 15.13

DC gain at frequency f = 0 is given by,

  A = \frac{V_{out} }{V_{in} }

V_{out} =AV_{in}

V_{out} = 15.13 \times   0.18 \cos (2\pi (57000)t +18.3)

At zero frequency above equation is written as,

V_{out} = 2.72 \times \cos 18.3

V_{out} = 2.72

Now we write output voltage as input voltage,

V_{out} (t) = 2.72 \cos (2\pi (57000)t +18.3)

Therefore, output voltage equation is V_{out} (t) = 2.72 \cos (2\pi (57000)t +18.3)

7 0
2 years ago
A sample of wastewater is diluted 10 times. The diluted solution has an ultimate biochemical oxygen demand (BOD), Lo, of 30 mg/L
zzz [600]

Answer:

474.59 mg/L

Explanation:

Given that

BOD = 30 mg/L

Original BOD  = 30 mg/L × dilution factor

Original BOD  = 30 mg/L  × 10 = 300 mg/L

L_o = \frac{BOD}{1-e^{-5t}}

here L_o is the ultimate BOD ; BOD is the  biochemical oxygen demand ;  t = 0.20 /day

L_o = \frac{300}{1-e^{-5(0.20)}}

L_o = 474.59 \ mg/L

3 0
3 years ago
What is an isentropic process?
snow_tiger [21]

Answer: Isentropic process is the process in fluids which have a constant entropy.

Explanation: The  isentropic process is considered as the ideal thermodynamical  process and has both adiabatic as well as reversible processes in internal form.This process supports no transfer of heat and  no transformation of matter .The entropy of the provided mass also remains unchanged or consistent.These processes are usually carried out on material on  the efficient device.

5 0
3 years ago
Establishes general guidelines concerning licensing and vehicle
gavmur [86]

Answer:

A. National Highway Safety Act

Explanation:

The National Highway Safety Act establishes general guidelines concerning licensing, vehicle registration and inspection, and traffic laws for state regulations. The act was made in 1966 to reduce the amount of death on the highway as a result of increase in deaths by 30% between 1960 and 1965

National Traffic and Motor Vehicle Safety Act regulates vehicle manufacturers  by ensuring national safety standards and issuance recalls for defective vehicles

Uniform Traffic Control Devices Act  defines shapes, colors and locations for road signs, traffic signals, and road markings

5 0
3 years ago
Read 2 more answers
As the impurity concentration in solid solution of a metal is increased, the tensile strength:________.a) decreasesb) increasesc
valkas [14]

Answer:

Increases

Explanation:

By inhibiting the motion of dislocations by impurities in a solid solutions, is a strengthening mechanism. In solid solutions it is atomic level strengthening resulting from resistance to dislocation motion. Hence, the strength of the alloys can differ with respect to the precipitate's property. Example, the precipitate is stronger (ability to an obstacle to the dislocation motion) than the matrix and it shows an improvement of strength.

5 0
3 years ago
Other questions:
  • The net potential energy EN between two adjacent ions, is sometimes represented by the expression
    13·1 answer
  • A rectangular concrete beam has dimensions b=16 in. and h=30 in. The location of the Gr. 60 reinforcing bars, which are placed a
    15·1 answer
  • Calculate the equivalent capacitance of the three series capacitors in Figure 12-1
    5·1 answer
  • Which of the following waste characteristic is considered to be hazardous:
    15·1 answer
  • A car generator turns at 400 rpm (revolutions per minute) when the engine is idling. It has a rectangular coil with 300 turns of
    7·1 answer
  • the voltage across a 5mH inductor is 5[1-exp(-0.5t)]V. Calculate the current through the inductor and the energy stored in the i
    6·1 answer
  • Is the gap store an example of commercial construction? Yes or no
    10·1 answer
  • Which Two moon phases are directly opposite each other?
    9·2 answers
  • Write down about the water source selection criteria​
    9·1 answer
  • John has an exhaust leak in his Acura Integra GS-R, What steps would he take to fix the leak in time for his inspection?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!