HOC24
Lớp học
Môn học
Chủ đề / Chương
Bài học
program Project1; uses crt; var a:array[1..100] of integer; n, i:integer; begin clrscr; write('Nhap vao so phan tu co trong day:='); readln(n); for i:=1 to n do begin write('Nhap vao phan tu thu ',i,' :='); readln(A[i]); end; for i:=1 to n do writeln(A[i]); readln; end.
Có nghĩa là in ra tổng các phần tử lẻ đúng không bạn?
program Project1;
var a:array [1..100] of integer; n, i: integer; le: integer; begin write('Nhap so phan tu co trong mang: '); readln(n); for i:=1 to n do begin write('Nhap vao phan tu thu A[',i,']: '); readln(A[i]); end; le:=0; for i:=1 to n do begin if (A[i] mod 2 <> 0) then le:=le+A[i]; end; writeln('Tong cac phan tu le la ', le); readln; end.
Câu 1: https://pastebin.com/2QGwMzpD
Câu 2: https://pastebin.com/ajKiwv44
Câu 3: https://pastebin.com/xcLn9HLn
Câu 4: https://pastebin.com/Mrje1ZWx
https://pastebin.com/aBdUyhi4
Bài làm mình để ở đây: https://pastebin.com/EASPa7M0
Mình làm đây nhé.
https://pastebin.com/30TMyAWn
Mình làm ở đây
https://pastebin.com/0SYGG2Re
Mình làm đây nhé: https://hastebin.com/kijavakeko.pas