answersLogoWhite

0

A basic algorithm for finding the greatest of five numbers with nested if statements would be as follows. Assuming five inputs a, b, c, d, and e, the algorithm would be, if(a>b && a>c && a>d && a>e) then output a, else if(b>a && b>c && b>d && b>e) then output b, else if(c>a && c>b && c>d && c>e) then output c, else if(d>a && d>b && d>c && d>e) then output d, else output e.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

Draw a Flowchart to find out the greatest number among three given number?

idskjhgfhg


Draw a flow chart to find out the greatest number among the three given numbers ab c?

draw a flowchart to find the biggest number among the 3 numbers


To find the greatest among two numbers using only if condition and not else?

int Greatest(int X, int Y){if(X > Y)return X;return Y;}


Find two numbers that given number 4 as the greatest common factor?

4 and 8, among others.


How do you find a greatest number of a number?

Which number is greatest?0.0990.2920.3810.413


Program to find the greatest number?

The greatest number is infinity.


Can you find the greatest integer plotted on a number line?

To find the greatest integer plotted on a number line, you would look for the rightmost point marked on the line, as integers increase in value from left to right. If the number line is finite and has specific integers plotted, the greatest one will be the largest value among those points. If the number line extends infinitely, there is no greatest integer, as integers continue indefinitely.


How can I find a greatest factor of 96?

The greatest factor of any number is the number itself.


How do you write a Shell script to find the greatest among the given set of numbers using command line arguments?

To find the greatest number among a set of numbers provided as command line arguments in a Shell script, you can use a loop to iterate through the arguments. Here's a simple example: #!/bin/bash greatest=$1 for num in "$@"; do if (( num > greatest )); then greatest=$num fi done echo "The greatest number is: $greatest" Save this script as find_greatest.sh, make it executable with chmod +x find_greatest.sh, and run it by passing numbers as arguments, like ./find_greatest.sh 3 5 1 8.


When you subtract the smallest number from the greatest number you will find the?

Range.


How to find the greatest integer plotted on a number line?

Find the number which is furthest to the right.


How do you find the greatest whole number?

There is no greatest whole number. If x were the greatest whole number then what about x+1? It would be greater than x and it would be a whole number!