0

Wap to take n numbers from the user and print Largest and Second Largest number out of that

Please answer quickly and please don't use list

23rd Oct 2020, 2:53 AM
Harsh Sinha
Harsh Sinha - avatar
4 Respostas
+ 3
Here's a couple ways in python https://code.sololearn.com/cVqEO7Gc3bQ8/?ref=app Java https://code.sololearn.com/cDbXK8UvmP75/?ref=app Edit: codes updated for bug fixes. Thanks Ipang !
23rd Oct 2020, 4:18 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
Share your attempt
23rd Oct 2020, 2:58 AM
Vadivelan
+ 1
Harsh, Please specify language name in tags above ☝
23rd Oct 2020, 3:47 AM
Ipang
0
a=int(input("Enter the number of terms you want to enter":)) for i in range(1,a+1): print(float(input("Enter the number:"))) After this I don't know what to do. Please reply fast if possible I will be thankful to you.
23rd Oct 2020, 3:01 AM
Harsh Sinha
Harsh Sinha - avatar