KHÁM PHÁ Học Toán + Tiếng Anh theo Sách Giáo Khoa cùng học online và gia sư dạy kèm tại nhà từ lớp 1 đến lớp 12 với giá cực kỳ ưu đãi kèm quà tặng độc quyền"CỰC HOT".
+ B1: Nhập N và dãy a1 ,…,aN; + B2: Max Ñ a1 , i Ñ 2; + B3:nếu i>N thì đưa giá trị Max rồi kết thúc; + B4: B4.1:Nếu ai>Max thì Maxß ai ; B4.2: ißi+1 rồi quay lại bước 3;
Giải thích các bước giải:
+ B1: Nhập N và dãy a1
,…,aN;
+ B2: Max Ñ a1
, i Ñ 2;
+ B3:nếu i>N thì đưa giá trị Max rồi kết thúc;
+ B4:
B4.1:Nếu ai>Max thì Maxß ai
;
B4.2: ißi+1 rồi quay lại bước 3;