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
HELP PLEASE!!!!
DaniilM [7]

Answer:

DESCULPA MAS EU NÃO ENTENDI

8 0
3 years ago
B)<br>State the essential difference between a plain carbon steel<br>and an alloy steel​
choli [55]

Answer:

Plain carbon steel has no or trace external elements while alloy steel has high amount of other elements.

Explanation:

Plain carbon steel has no or trace amount of other elements while alloy steel has high amount of other elements in their composition.

The presence of other elements in alloy steel improvise several physical properties of the steel while plain carbon steel has the basic properties.

6 0
3 years ago
An aluminium alloy tube has a length of 750 mm at a temperature of 223°C. What will be its length at 23°C if its coefficient of
uranmaximum [27]

Answer:

Final length= 746.175 mm

Explanation:

Given that Length of aluminium at 223 C is 750 mm.As we know that when temperature of material increases or decreases then dimensions of material also increases or decreases respectively with temperature.

Here temperature of aluminium decreases so the final length of aluminium decreases .

As we know that

\Delta L=L\alpha\Delta T

Now by putting the values

\Delta L=750\times \25.5\times 10^{-6}\times 200

ΔL=3.82 mm

So final length =750-3.82 mm

Final length= 746.175 mm

3 0
3 years ago
Distinguish between systems analysis and systems design?
Zielflug [23.3K]

Answer:

System analysis can be defined as a deep analysis of a part of the structure of a module that has been designed before. System design means to make any module or a part of the structure from scratch and build it completely without estimation.

Explanation:

3 0
3 years ago
A person is planning a bungee jump from a 40 meter high bridge. Under the bridge is a river with crocodiles, so the person does
Nonamiya [84]

Answer:

a. l = 19.7m, b. 18.55m, c. Impact Force = 3889.84 N

Explanation:

The total energy of the system when the person is at top of the bridge is

Potential energy = mgh, Kinetic energy = 0

The total energy of the  system when the person reaches just above the surface

Potential energy = 0, Kinetic energy = 0, Spring energy = ½ K X2, where k is the spring constant and X is the deflection

Applying conservation of energy

mgh = 0 + 0 + ½ K X²

80 x 9.81 x 40 = ½ (3600/l) X²

31392 = ½ (3600/l) X²

We can also conclude that

l+ X + 1.75 = 40

l + X = 38.25

a. <u>Substitute the value of x from above into the energy conversion expression</u>

31392 = ½ (3600/l)(38.25 - l)²

31392 x 2/3600 = (38.25 + l² – 2l(38.25))/l

17.44l = l2 – 76.5l + 38.25²

l² – 76.5l – 17.44l +1463.0625 = 0

Solving for l we get

L = 19.7

Hence, length of the rope is 19.7m

b. <u>The deflection is calculated by using the relation between l and X</u>

L + X = 38.25

X = 38.25 – 19.7 = 18.55m

c. <u>The impact force is calculated using the impact force formula which relates the impact force with the deflection</u>

F = KX

F = (3600/l) . X

F = (3600/19.7) . (18.55) = 3889.84 N

Thus, the impact force is 3889.84 N

3 0
3 years ago
Other questions:
  • A turbine operates at steady state, and experiences a heat loss. 1.1 kg/s of water flows through the system. The inlet is mainta
    6·1 answer
  • Output all combinations of character variables a, b, and c. If a = 'x', b = 'y', and c = 'z', then the output is: xyz xzy yxz yz
    14·1 answer
  • The themes around which social sciences texts are organized boost understanding by
    11·1 answer
  • Help now please evaluate using the commutative property: 40 (32) (10) (25)
    8·1 answer
  • Arc blow typically occurs in steel and metals that contain iron.<br> True or false
    7·2 answers
  • A Wii remote flung from a hand through a TV, with a kinetic energy of 1.44J and a mass of 4.5kg. Whats the velocity?
    6·1 answer
  • Find all the words, Figure out my puzzle!
    14·2 answers
  • P9.28 A large vacuum tank, held at 60 kPa absolute, sucks sea- level standard air through a converging nozzle whose throat diame
    12·1 answer
  • (CO 3) A nonrecursive filter may best be described as _____. Group of answer choices a filter whose current output depends on pa
    13·1 answer
  • The ruler game, HELPPPP PLS
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!