nhập a b c d e f từ bàn phím cho biết có bao nhiêu số chia hết cho 2 24/07/2021 Bởi Rose nhập a b c d e f từ bàn phím cho biết có bao nhiêu số chia hết cho 2
program Baitap; uses crt; var a,b,c,d,e,f:integer; i:byte; begin clrscr; writeln(‘nhap a=’); readln(a); writeln(‘nhap b=’); readln(b); writeln(‘nhap c=’); readln(c); writeln(‘nhap d=’); readln(d); writeln(‘nhap e=’); readln(e); writeln(‘nhap f=’); readln(f); begin for i:=1 to a do if a mod 2= 0 then write (‘a chia het cho 2:’,); readln; end. *** nếu bài đúng thì cho mình ctlhn nha :”<< Bình luận
program demchia; uses crt; var a,b,c,d,e,f:integer; dem:byte; begin clrscr; dem:=0; write(‘Nhap a: ‘); readln(a); if a mod 2=0 then dem:=dem+1; write(‘Nhap b: ‘); readln(b); if b mod 2=0 then dem:=dem+1; write(‘Nhap c: ‘); readln(c); if c mod 2=0 then dem:=dem+1; write(‘Nhap d: ‘); readln(d); if d mod 2=0 then dem:=dem+1; write(‘Nhap e: ‘); readln(e); if e mod 2=0 then dem:=dem+1; write(‘Nhap f: ‘); readln(f); if f mod 2=0 then dem:=dem+1; write(‘Co ‘,d,’ so chia het cho 2′); readln end. Bình luận
program Baitap;
uses crt;
var a,b,c,d,e,f:integer;
i:byte;
begin
clrscr;
writeln(‘nhap a=’); readln(a);
writeln(‘nhap b=’); readln(b);
writeln(‘nhap c=’); readln(c);
writeln(‘nhap d=’); readln(d);
writeln(‘nhap e=’); readln(e);
writeln(‘nhap f=’); readln(f);
begin
for i:=1 to a do
if a mod 2= 0 then write (‘a chia het cho 2:’,);
readln;
end.
*** nếu bài đúng thì cho mình ctlhn nha :”<<
program demchia;
uses crt;
var a,b,c,d,e,f:integer;
dem:byte;
begin
clrscr;
dem:=0;
write(‘Nhap a: ‘); readln(a);
if a mod 2=0 then dem:=dem+1;
write(‘Nhap b: ‘); readln(b);
if b mod 2=0 then dem:=dem+1;
write(‘Nhap c: ‘); readln(c);
if c mod 2=0 then dem:=dem+1;
write(‘Nhap d: ‘); readln(d);
if d mod 2=0 then dem:=dem+1;
write(‘Nhap e: ‘); readln(e);
if e mod 2=0 then dem:=dem+1;
write(‘Nhap f: ‘); readln(f);
if f mod 2=0 then dem:=dem+1;
write(‘Co ‘,d,’ so chia het cho 2′);
readln
end.