InterviewSolution
Saved Bookmarks
| 1. |
Write an algorithm to find largest of two numbers |
|
Answer» hm to find the LARGEST of two numbers is GIVEN below:STEP 1: START.STEP 2: Accept the first number, say A.STEP 3: Accept the second number, say B.STEP 4: Check if A > B. If true, display A. STEP 5: Check if B > A. If true, display B.STEP 6: Check if A == B. If true, PRINT - "Both are equal."STEP 7: STOP.A sample Python PROGRAM for the same:a=int(input('Enter first number: '))b=int(input('Enter second number: '))if a>b: print(a,'is the largest number.')elif a |
|