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
Conclusion. What process is responsible for the bubbling action of the organism? What is your evidence?
noname [10]

Answer:

Explanation:

Hands-on Activity Bubbling Plants Experiment to Quantify Photosynthesis ... After running the experiment, students pool their data to get a large sample ... Explain that photosynthesis is a process that plants use to convert light ... Describe a simple experiment that provides indirect evidence that photosynthesis is occurring.

Through photosynthesis, certain organisms convert solar energy (sunlight) into ... of our planet continuously and is transferred from one organism to another. Therefore, directly or indirectly, the process of photosynthesis provides most of the energy ... Biology in Action ... Chlorophyll is responsible for the green color of plants.Photosynthetic organisms capture energy from the sun and matter from the air to ... oxygen produced during photosynthesis makes leaf bits float like bubbles in water. ... their ability to carry out photosynthesis, the biochemical process of capturing ... this air is forced out and replaced with solution, causing the leaves to sink.

6 0
2 years ago
2. A well of 0.1 m radius is installed in the aquifer of the preceding exercise and is pumped at a rate averaging 80 liter/min.
hodyreva [135]

Question:

The question is not complete. See the complete question and the answer below.

A well that pumps at a constant rate of 0.5m3/s fully penetrates a confined aquifer of 34 m thickness. After a long period of pumping, near steady state conditions, the measured drawdowns at two observation wells 50m and 100m from the pumping well are 0.9 and 0.4 m respectively. (a) Calculate the hydraulic conductivity and transmissivity of the aquifer (b) estimate the radius of influence of the pumping well, and (c) calculate the expected drawdown in the pumping well if the radius of the well is 0.4m.

Answer:

T = 0.11029m²/sec

Radius of influence = 93.304m

expected drawdown = 3.9336m

Explanation:

See the attached file for the explanation.

8 0
3 years ago
A sample of sand weighs 490 g in stock and 475 in Oven Dry (OD) condition, respectively. If absorption capability of the sand is
Ivahew [28]

The weight of the specimen in SSD condition is 373.3 cc

<u>Explanation</u>:

a) Apparent specific gravity = \frac{A}{A-C}

Where,

A = mass of oven dried test sample in air = 1034 g

B = saturated surface test sample in air = 1048.9 g

C = apparent mass of saturated test sample in water = 975.6 g

apparent specific gravity = \frac{A}{A-C}

                                         = \frac{1034}{1034-675 \cdot 6}

Apparent specific gravity = 2.88

b) Bulk specific gravity G_{B}^{O D}=\frac{A}{B-C}

G_{B}^{O D}=\frac{1034}{1048.9-675 \cdot 6}

       =  2.76

c) Bulk specific gravity (SSD):

G_{B}^{S S D}=\frac{B}{B-C}

=\frac{1048 \cdot 9}{1048 \cdot 9-675 \cdot 6}

G_{B}^{S S D} = 2.80

d) Absorption% :

=\frac{B-A}{A} \times 100 \%

=\frac{1048 \cdot 9-1034}{1034} \times 100

Absorption = 1.44 %

e) Bulk Volume :

v_{b}=\frac{\text { weight of dispaced water }}{P \omega t}

=\frac{1048 \cdot 9-675 \cdot 6}{1}

= 373.3 cc

5 0
2 years ago
Technician A says the final drive assembly always has a gear ratio of 1:1. Technician B says the final drive assembly provides f
Olenka [21]

Answer:

Technician B only is correct

Explanation:

The last stage of gears found between the vehicle transmission system and the wheels is the final drive ratio. The function of the final drive gear assembly is to enable a gear reduction control stage to reduce the rotation per minute and increase the wheel torque, such that the vehicle performance can be adjusted and the final gear ratio can be between 3:1 and 4.5:1 not 1:1

Therefore, technician B only is correct

5 0
3 years ago
You are traveling upstream on a river at dusk. You see a buoy with the number 5 and a flashing green light . What should you do?
nalin [4]

Answer:

please give brainliest my brother just got the corona virus

Explanation:

this is my brothers account he wants to get 5 brainliest

8 0
3 years ago
Other questions:
  • Find the thickness of the material that will allow heat transfer of 6706.8 *10^6 kcal during the 5 months through the rectangle
    8·1 answer
  • Air as an ideal gas in a closed system undergoes a reversible process between temperatures of 1000 K and 400 K. The beginning pr
    9·1 answer
  • 2. One of the following systems is not typically used with floor
    5·1 answer
  • Are spheroidized steels considered as composite? If so, what is the dispersed phase a)- No b)- Yes, Chromium Carbides c)- Yes, I
    12·1 answer
  • Where is the Volkswagen super factory located? how is this locate relevant to us?​
    5·1 answer
  • An electrochemical cell is composed of pure nickel and pure iron electrodes immersed in solutions of their divalent ions. If the
    13·1 answer
  • Which one of the following activities is not an example of incident coordination
    15·1 answer
  • 1. True/False The Pressure Relief valve maintains the minimum pressure in the hydraulic circuit​
    13·1 answer
  • In the planning process of the product development life cycle what is it important to inventory
    7·1 answer
  • For heat transfer purposes, a standing man can be mod-eled as a 30-cm-diameter, 170-cm-long vertical cylinderwith both the top a
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!