uses crt;
var a,b:integer;
bo:boolean;
begin
write('Nhap nam :');readln(b);
if (b mod 100=0) then bo:=(b mod 400)=0 else
bo:=(b mod 4 )=0;
if bo then
begin
repeat
clrscr;
write('Nhap thang :');readln(a);
until (a>0) and (a<13);
case a of
2:write('Co 29 ngay');
1,3,5,7,8,10,12:write('Co 31 ngay');
4,6,9,11:write('Co 30 ngay');
end;
end;
if (not bo) then
begin
repeat
clrscr;
write('Nhap thang :');readln(a);
until (a>0) and (a<13);
case a of
2:write('Co 28 ngay');
1,3,5,7,8,10,12:write('Co 31 ngay');
4,6,9,11:write('Co 30 ngay');
end;
end;
readln;
end.

cam on nhieu ve ngung bai tap va bai giai de hieu
20:52 16 tháng 4, 2013
Cheap jordans, wholesale jordan shoes, nike free, cheap nike shoes, cheap jordan, cheap jordans, wholesale jordan shoes for sale, ugg, ugg australia, air jordan shoes, Bags Louis Vuitton, Cheap LV Handbags, Discount LV Handbags, cheap jordan shoes, Cheap Nike jordan shoes, cheap nike jordan shoes, uggs outlet, cheap nike free, discount nike jordans, jordan shoes for cheap, wholesale jordan shoes, ugg soldes, cheap nike free run, cheap jordans, Cheap Louis Vuitton Handbags, ugg pas cher, ugg boots, cheap nike air max, Discount Louis Vuitton, uggs on sale
15:20 21 tháng 11, 2014
Một tháng có 30 hoặc 31 thế kỉ ( ta là THÁNH ĐỊT LỒN :)))
20:43 1 tháng 4, 2015
có code theo kiểu mảng k ad
09:39 6 tháng 10, 2015
Ngắn hơn và hay hơn.
uses crt;
var ng,m,y:integer;
begin
repeat
clrscr;
write('Nhap thang: ');readln(m);
until (m>0) and (m<13);
write('Nhap nam: ');readln(y);
case m of
4,6,9,11:ng:=30;
2:if (y mod 4<>0) or ((y mod 100=0) and (y mod 400<>0)) then ng:=28 else ng:=29;
else ng:=31;
end;
write('Thang ',m,' nam ',y,' co ',ng,' ngay');
readln;
end.
19:11 21 tháng 7, 2017
Đăng nhận xét