If you want python program to find the maximum among three given numbers then you are at right place. As python is the future of the technology, we all want to become a master in this programming language. Let’s start with the basic.
Here we are going to tell how you can write a
simple program which finds the maximum among three numbers. We will have three
number (assume that the three numbers are always different) and our goal is to
find out the maximum number among those three numbers.
Example:
Input: a, b, c, = 1, 9, 3 Output: 9 |
Input: a, b, c, = 25, 96, 300 Output: 300 |
Task:
For given Pseudo-Code Magnets arrange it in correct order and complete
Pseudo-Code Magnets:
input Number1, Number2, Number3
if (Number1 > Number3) then
display "Num1 is the largest"
if (Number1 >Number2) then
end-if
else if (Number2 < Number3) then
display "Num2 is the largest"
else
else
display "Num3 is the largest"
display "Num3 is the largest"
end-if
Code:
Output:
Note: If you have any doubt regarding the program, you can mention them in the
comment section.
Comments
Post a Comment