Find Maximum Value for 10 Integers
Write a code to find maximum value for 10 integers?
Answers
Answered by
0
this is the code to find maximum value among the given 10 integers...
Attachments:
Answered by
0
Python program :
Explanation:
maximum=0#It is used to hold teh mximum value
for count in range(10):#For loop which takes the 10 input from the user.
number=int(input("Enter the number"))
if(maximum<number):#check the maximum number.
maximum=number#print the maximum number.
print("The maximum number is: ",maximum)#print the maximum number.
Output :
- If the user input as 1,0,0,0,2,0,9,0,1,5 then the output is :9.
- If the user input as 1,0,0,0,2,0,10,0,1,5 then the output is :10.
Code Explanation:
- The above code is in python language which is used to take the 10 input from the user by the help of for loop.
- Then he checks the maximum number from them by comparing all the number.
Learn More :
- Python : https://brainly.in/question/14689905
Similar questions