Hindi, asked by bhaveshawal3756, 1 day ago

Wirte an algorithm and flowchart in to find miximum given three numbers

Answers

Answered by ananyamishra76824
0

Answer:

There are various methods to find the largest number. Like you can use the maximum function of the programming language directly but the main thing here is understanding how you solve any problem or what is the logic behind the problem and its time complexity. Everyone seeks the shortest time to solve a problem for efficient performance. Coding is all about brainstorming and what was your logic behind any problem. The more you go through problems the better you will be at it.

To solve this problem, you can use only If statements or If and else or nested If and else or using Ternary Operator. These are all of the same type comparing the numbers which each other. The only difference is the way of writing. I will be using the Ternary operator as many of them don't use it but is very useful as with few lines you can write the program.

In this algorithm, we will be comparing two numbers. If the first number is greater then first number will be compared with the third number whichever number is greater print that. If the first number is smaller then compare second number with the third number, whichever is greater among two print that number.

Similar questions