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
A 200-mm-long strip of metal is stretched in two steps, first to 300 mm and then to 400 mm. Show that the total true strain is t
Neko [114]

Explanation:

For true Strain:

step 1:

E true = Ln(1 + 0.5 ) = 0.40

Step 2:

E true = Ln(1 + 0.33 ) = 0.29

By single step process:

E true = Ln(1 + 1 ) = 0.69

total strain of step process = 0.40 + 0.29 = 0.69 units

SO TRUE STRAIN IS ADDITIVE.

4 0
3 years ago
Ultimate tensile strength is: (a) The stress at 0.2% strain (b) The stress at the onset of plastic deformation (c) The stress at
MissTica

Answer:

By definition the ultimate tensile strength is the maximum stress in the stress-strain deformation. The stress at 0.2% strain, the stress at the onset of plastic deformation, the stress at the end of the elastic deformation and the stress at the fracture correspond, by definition, to other points of the stress-strain curve.

Explanation:

4 0
3 years ago
A fill covering a wide area is to be placed at the surface of this profile. The fill has a total unit weight of 20 kN/m^3 and is
goblinko [34]

Answer:

hello your question lacks some information attached below is the complete question with the required information

answer : 81.63 mm

Explanation:

settlement of the surface due to compression of the clay ( new consolidated )

= 81.63 mm

attached below is a detailed solution to the given problem

8 0
3 years ago
You don't have to notify employees that a lockout/tagout is about to begin?
Sergeu [11.5K]

Answer:

When the imposter is sus : O

Explanation:

3 0
3 years ago
6. What types of injuries can occur in an electronics lab and how can they be prevented?
marysya [2.9K]

Answer:

The most common injuries in a chemistry lab is making a fire, heat burns, chemical burns, cuts and scrapes, contamination, inhalation, and spills and breaks.

1.) You can prevent making a fire by making sure you close and seal flammable materials.

2.) You can prevent heat burns by teaching the students how to properly use tongs,water baths, and other cooling equipment. 

3.) You can prevent chemical burns by treating the chemicals with caution, measure carefully, and use the approved containers.

4.) You can prevent cuts and scrapes by telling the students how to use the blades safely, and also when they are disposing broken or sharp items they should know how to wrap them up so no one else will get hurt. 

5.) You can prevent contamination by washing your hands, protect their clothing and skin with a lab coat or a lab apron, gloves and glasses, and cleaning your area where the germs of the chemicals were so no one will become.

6.) You can prevent inhalation by opening up windows, using ventilation fans, and using an equipment that measures the amount of gas emission in a room.

7.) Finally, you can prevent spills and breaks by telling the students what will happen if anything spills, and tell them to clean up.  

8 0
3 years ago
Other questions:
  • The Fibonacci sequence 1, 1, 2, 3, 5, 8, 13, 21…… starts with two 1s, and each term afterward is the sum of its two predecessors
    8·2 answers
  • A surveyor is trying to find the height of a hill . he/she takes a sight on the top of the hill and find that the angle of eleva
    12·1 answer
  • an adiabatic compressor receives 1.5 meter cube per second of air at 30 degrees celsius and 101 kpa. The discharge pressure is 5
    11·1 answer
  • How is TEL (total equivalent length) measured and calculated? .​
    12·1 answer
  • Fix the code so the program will run correctly for MAXCHEESE values of 0 to 20 (inclusive). Note that the value of MAXCHEESE is
    8·1 answer
  • When wasDisney Cruise Line founded
    5·1 answer
  • I am standing on the upper deck of the football stadium. I have an egg in my hand. I am going to drop it and you are going to tr
    7·1 answer
  • When does someone's work on the Internet become copyrighted?
    15·1 answer
  • What is the command this line of code is telling the robot?
    13·2 answers
  • A jointed arm robot can rotate on the following 6 axes?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!