KMUTNB, 5801012610164
วันจันทร์ที่ 21 กันยายน พ.ศ. 2558
LAB 5 Find maxinum value in array
def find_maxinum_value():
A = [-5,5,10,20,30,40,-50,-60,-80,-100]
maxNumber = 0;
count = 0;
while(count<len(A)):
if(A[count] > maxNumber):
maxNumber = A[count]
count = 1+count
print (maxNumber)
find_maxinum_value()
ผลลัพธ์
40
ไม่มีความคิดเห็น:
แสดงความคิดเห็น
บทความใหม่กว่า
บทความที่เก่ากว่า
หน้าแรก
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น