answersLogoWhite

0

var largest : integer

largest = array[0]

for n : integer in array

if n > largest

largest = n

endif

endfor

return largest

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Why do you have a monitor and what are the uses?

A monitor is the "gateway" to your computer. It is the output of your computer. E.g. a mathematical formula has an input, an output and an algorithm. The keyboard & mouse is the input, the computer is the algorithm, and the monitor is the output.


Is input and output always equal?

No, input and output are not always equal. The output is the result of processing the input data based on a specific operation or algorithm. Depending on the operation or algorithm, the output may differ from the input.


What is input in algorithm?

In an algorithm, input refers to the data or information that is provided to the algorithm for processing. It serves as the starting point for the algorithm's operations and can vary in type, such as numbers, text, or other data structures. The algorithm manipulates this input to produce an output, which is the result of its computations or actions. Properly defining and handling inputs is crucial for the algorithm's accuracy and effectiveness.


What are the functions of algorithm?

A function is any relationship between inputs and outputs in which each input leads to exactly one output. It is possible for a function to have more than one input that yields the same output.


What are the three phases of an algorithm are?

The three phases of an algorithm are: Input Phase: This is where the algorithm receives data or parameters necessary for processing. Processing Phase: In this phase, the algorithm performs computations or operations on the input data to achieve the desired outcome. Output Phase: Finally, the algorithm produces results or outputs based on the processing, which can be displayed, stored, or used for further actions.


How do you write a program to print the first n multiples of 7?

Algorithm: multiples input: two positive integers, m and n output: print first n multiples of m i = m; for j = 1 to n print i i = i + m; next j


What is distribution sort?

Any sort algorithm where data is distributed from its input to multiple intermediate structures which are then gathered and placed on the output.


Which cache algorithm will optimize a storage arrays Input and Output response time if sequential access is detected?

Read Ahead


How do you explain characteristics of algorithm?

Characteristics of algorithms are: Finiteness: terminates after a finite number of steps Definiteness: rigorously and unambiguously specified Input: valid inputs are clearly specified Output: can be proved to produce the correct output given a valid input Effectiveness: steps are sufficiently simple and basic.


What is the input and output of kalman filter?

The Kalman filter is an algorithm to eliminate noise from statistical observations. The inputs and outputs are dependent on what you are applying it to.


How do you write an algorithm which takes students marks and grades them as follows Mark greater than 60 Pass?

To write an algorithm that grades students based on their marks, you can follow these steps: Input: Accept the student's marks as input. Condition Check: Use a conditional statement to check if the marks are greater than 60. Output: If the condition is true, output "Pass"; otherwise, output "Fail". Here’s a simple pseudocode representation: Input: student_marks If student_marks > 60 then Output "Pass" Else Output "Fail" End If


How can you demonstrate the correctness of an algorithm?

One way to demonstrate the correctness of an algorithm is through a process called proof of correctness. This involves providing a formal mathematical proof that the algorithm will always produce the correct output for any given input. This can be done by showing that the algorithm satisfies certain properties or invariants at each step of its execution. Additionally, testing the algorithm with a variety of input cases can also help to validate its correctness.