Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- A=[randint (1,100) for i in range (10)]
- print ("Массив:" , A )
- M1 = A[0]
- count1=1
- for i in range(1,10):
- if A[i] > M1:
- M1 = A[i]
- count1=i+1
- print ("М1: A[", count1 , "]=", M1, sep="" )
- M2 = A[0]
- count2=1
- for i in range(1,10):
- if A[i] > M2 and count1!=i+1:
- M2 = A[i]
- count2=i+1
- print ("М2: A[", count2 , "]=", M2, sep="" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement