1. Trang chủ
  2. » Luận Văn - Báo Cáo

BAI THUC HANH 3

2 5 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Nội dung

[r]

(1)BAI THỰC HÀNH Bai cau b Program baihai; Const Nmax=100; Type Myarray=[1 Nmax] of integer; Var A: Myarray; Dem: array[1 Nmax] of integer; N,k,I,j: integer; Begin Write(‘ nhap so phan tu N=’); readln (N); For i:=1 to n begin Write(‘ nhap phan tu thu’,I,’=’); Readln(A[i]); End; J:=1; k:=0; For i:=2 to n if A[i]> A[j] then j:= i; Dem[k]:= j; For i:= to n if A[i] =A[j] then Begin K:=k+1; Dem[k]:=i ; End; Writeln( ‘ gia tri lon nhat la :’,A[j] :4); Writeln(‘ chi so ung voi gia tri lon nhat la:’); For i:= to k write(‘ ‘, dem[i]); Writeln; (2) Readln; End (3)

Ngày đăng: 18/09/2021, 09:38

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w