Computer Fundamental
วันอาทิตย์ที่ 4 ตุลาคม พ.ศ. 2558
Lab 5 : Find the maximum value in array
def setup():
i = 0
n = [5,6,7,9,5,18,4]
maxi = n[0]
while(i<len(n)):
if(maxi<n[i]):
maxi = n[i]
i = i+1
print("Maximum = ",maxi)
setup()
ไม่มีความคิดเห็น:
แสดงความคิดเห็น
บทความใหม่กว่า
บทความที่เก่ากว่า
หน้าแรก
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น