1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Đề 2 ôn thi học sinh giỏi môn Tin học 9 cấp tỉnh

7 25 2

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

THÔNG TIN TÀI LIỆU

Nội dung

Tuyển tập đề ôn thi học sinh giỏi môn tin 9 cấp tỉnh, Đề thi học sinh giỏi tin 9, đề thi môn tin 9 cấp tỉnh, ôn thi học sinh giỏi môn tin 9, Tổng hợp đề thi môn tin 9 cấp tỉnh, tài liệu ôn thi môn tin 9 cấp tỉnh, đề thi có đáp án môn tin 9.

ĐỀ THI THỬ SỐ (VÒNG 2) Bai (7 điểm) Viết chương trình nhập mảng gồm n phần tử kiểu nguyên (nmax then max:=b[i]; write(' So xuat hien nhieu nhat la '); for i:=1 to n if max=b[i]then write(st[i],' '); write(' -xuat hien - ',max,' –lan '); Readln End Bài a) program ktra_so_hoan_hao; uses crt; var i,n:integer; function shh(n:integer):boolean; var i,tam:integer; ok:boolean; begin ok:=false; tam:=0; for i:=1 to n-1 if n mod i = then tam:=tam+i; if tam=n then ok:=true; shh:=ok; end; BEGIN clrscr; write ('nhap n= ');readln(n); for i:=1 to n if shh(i)=true then write (i,' '); readln END b) program ktra_so_hoan_hao; uses crt; var i,n:integer; function shh(n:integer):boolean; var i,tam:integer; ok:boolean; begin ok:=false; tam:=0; for i:=1 to n-1 if n mod i = then tam:=tam+i; if tam=n then ok:=true; shh:=ok; end; BEGIN clrscr; write ('nhap n= ');readln (n); for i:=1 to n if shh(i)=true then write (i,' '); readln END Bai Program Xoa_ki_tu_trung; Uses crt; Var i, j, n: integer; S: string; Begin Clrscr; Write (‘Nhap xau S: ‘); Readln(S); N:=length(S); I:=1; While i< n Begin J:=i+1; While j

Ngày đăng: 26/02/2021, 09:43

TỪ KHÓA LIÊN QUAN

w