# Find maximum in a list of numbers
print("\n\nFind maximum in a list of numbers")
no_of_terms = int(input("Enter number of terms : "))
max_num = 0
for counter in range(0,no_of_terms,1):
num = int(input("Enter number : "))
if (num > max_num):
max_num = num
print("Maximum value in the list of numbers is", max_num)
print("\n\nFind maximum in a list of numbers")
no_of_terms = int(input("Enter number of terms : "))
max_num = 0
for counter in range(0,no_of_terms,1):
num = int(input("Enter number : "))
if (num > max_num):
max_num = num
print("Maximum value in the list of numbers is", max_num)
No comments:
Post a Comment
Don't be a silent reader...
Leave your comments...
Anu