Program go; var x,y,z,n:real; begin write('Введите сегодняшнее число: '); readln(x); write('Введите номер сегодняшнего месяца: '); readln(y); begin if y=1 then n:=365-x else; if y=2 then n:=365-31-x else; if y=3 then n:=365-31-28-x else; if y=4 then n:=365-31-28-31-x else; if y=5 then n:=365-31-28-31-30-x else; if y=6 then n:=365-31-28-31-30-31-x else; if y=7 then n:=365-31-28-31-30-31-30-x else; if y=8 then n:=365-31-28-31-30-31-30-31-x else; if y=9 then n:=365-31-28-31-30-31-30-31-31-x else; if y=10 then n:=365-31-28-31-30-31-30-31-31-30-x else; if y=11 then n:=365-31-28-31-30-31-30-31-31-30-31-x else; if y=12 then n:=365-31-28-31-30-31-30-31-31-30-31-30-x else; end; writeln ('До Нового года осталось: ',n); end.
kostmax1971
19.07.2020
uses crt,graph; type mas=array[1..500] of Pointtype; var gd,gm,i,j,k,n:integer; a:mas; begin randomize; gd:=0; initgraph(gd,gm,''); for i:=1 to 500 do begin a[i].x:=random(getmaxX); a[i].y:=random(getmaxY); circle(a[i].x,a[i].y,2); end; k:=0;n:=0; repeat k:=k+1; delay(200); setcolor(0); for i:=1 to 500 do circle(a[i].x,a[i].y,2); for i:=1 to 500 do begin if a[i].y>getmaxY-n-10 then a[i].y:=1 else a[i].y:=a[i].y+3; if a[i].x<0 then a[i].x:=getmaxX else a[i].x:=a[i].x-1; end; setcolor(15); for i:=1 to 500 do circle(a[i].x,a[i].y,2); if k mod 20=0 then begin n:=n+1; line(0,getmaxY-n,getmaxX,getmaxY-n); end; until keypressed; readln end.
var x,y,z,n:real;
begin
write('Введите сегодняшнее число: ');
readln(x);
write('Введите номер сегодняшнего месяца: ');
readln(y);
begin
if y=1
then n:=365-x
else;
if y=2
then n:=365-31-x
else;
if y=3
then n:=365-31-28-x
else;
if y=4
then n:=365-31-28-31-x
else;
if y=5
then n:=365-31-28-31-30-x
else;
if y=6
then n:=365-31-28-31-30-31-x
else;
if y=7
then n:=365-31-28-31-30-31-30-x
else;
if y=8
then n:=365-31-28-31-30-31-30-31-x
else;
if y=9
then n:=365-31-28-31-30-31-30-31-31-x
else;
if y=10
then n:=365-31-28-31-30-31-30-31-31-30-x
else;
if y=11
then n:=365-31-28-31-30-31-30-31-31-30-31-x
else;
if y=12
then n:=365-31-28-31-30-31-30-31-31-30-31-30-x
else;
end;
writeln ('До Нового года осталось: ',n);
end.