A voir également:
- Programme jour suivant
- Programme demarrage windows 10 - Guide
- Mise a jour chrome - Accueil - Applications & Logiciels
- Mise a jour windows 10 - Accueil - Mise à jour
- Mettre à jour ses pilotes - Guide
- Désinstaller programme windows 10 - Guide
1 réponse
program date_de_demain;
uses crt;
var a1,a2,m2,m1,j1,j2,j:integer; bool:boolean;
{****************************PROCEDURE MENUE******************************}
procedure menu;var i,j:integer;
begin textcolor(12);
for i:=17 to 56 do for j:=05 to 16 do
begin gotoxy(17,j); write('['); gotoxy(56,j); write(']'); end;
for i:=17 to 56 do for j:=05 to 16 do
begin gotoxy(i,05); write('='); gotoxy(i,16); write('='); end;
for i:=18 to 55 do
begin gotoxy(i,07); write('_'); gotoxy(i,11); write('_'); gotoxy(i,13); write('_'); end;
end;
{**************************PROGRAMME PRINCIPALE***************************}
begin clrscr;menu;textcolor(27);
begin gotoxy(30,06);write('BIENVENUE');end; textcolor(10);
gotoxy(20,08);write('Entrer le jour de la date : ');readln(j1);
{**********CONDITION LIMITATION DU JOUR**********}
bool:=false;
while bool=false do
begin if (j1<=0) or (j1>31) then
begin bool:=false;
gotoxy(20,08);write('le jour entre 1 et 31 r‚p‚ter : ');readln(j1);
end else bool:=true; end;
gotoxy(20,09);write('Entrer le mois de la date : ');readln(m1);
{**********CONDITION LIMITATION DU MOIS**********}
bool:=false;
while bool=false do
begin if (m1<=0) or (m1>12) then
begin bool:=false;
gotoxy(20,09);write('le mois entre 1 et 12 r‚p‚ter : ');readln(m1);
end else bool:=true; end;
gotoxy(20,10);write('Entrer l`ann‚e de la date : ');readln(a1);
{TESTE JOUR DU MOIS}
if (m1=1) or (m1=3) or (m1=5) or (m1=7) or (m1=8) or (m1=10) or (m1=12)
then j:=31
else if (m1=4) or (m1=6) or (m1=9) or (m1=11) then j:=30
else begin if a1 mod 4=0 then j:=29 else j:=28; end;
gotoxy(20,12);writeln('le maximum du jour est : ',j);
if j1<j then begin a2:=a1;m2:=m1;j2:=j1+1;end
else if m1<>12 then begin a2:=a1;m2:=m1+1;j2:=1;end
else begin a2:=a1+1;m2:=1;j2:=1; end;
{L`AFFICHAGE DE LA DATE}
gotoxy(20,14);writeln('la date de demain est : ',a2,'/ ',m2,'/ ',j2);
readln;
end.
uses crt;
var a1,a2,m2,m1,j1,j2,j:integer; bool:boolean;
{****************************PROCEDURE MENUE******************************}
procedure menu;var i,j:integer;
begin textcolor(12);
for i:=17 to 56 do for j:=05 to 16 do
begin gotoxy(17,j); write('['); gotoxy(56,j); write(']'); end;
for i:=17 to 56 do for j:=05 to 16 do
begin gotoxy(i,05); write('='); gotoxy(i,16); write('='); end;
for i:=18 to 55 do
begin gotoxy(i,07); write('_'); gotoxy(i,11); write('_'); gotoxy(i,13); write('_'); end;
end;
{**************************PROGRAMME PRINCIPALE***************************}
begin clrscr;menu;textcolor(27);
begin gotoxy(30,06);write('BIENVENUE');end; textcolor(10);
gotoxy(20,08);write('Entrer le jour de la date : ');readln(j1);
{**********CONDITION LIMITATION DU JOUR**********}
bool:=false;
while bool=false do
begin if (j1<=0) or (j1>31) then
begin bool:=false;
gotoxy(20,08);write('le jour entre 1 et 31 r‚p‚ter : ');readln(j1);
end else bool:=true; end;
gotoxy(20,09);write('Entrer le mois de la date : ');readln(m1);
{**********CONDITION LIMITATION DU MOIS**********}
bool:=false;
while bool=false do
begin if (m1<=0) or (m1>12) then
begin bool:=false;
gotoxy(20,09);write('le mois entre 1 et 12 r‚p‚ter : ');readln(m1);
end else bool:=true; end;
gotoxy(20,10);write('Entrer l`ann‚e de la date : ');readln(a1);
{TESTE JOUR DU MOIS}
if (m1=1) or (m1=3) or (m1=5) or (m1=7) or (m1=8) or (m1=10) or (m1=12)
then j:=31
else if (m1=4) or (m1=6) or (m1=9) or (m1=11) then j:=30
else begin if a1 mod 4=0 then j:=29 else j:=28; end;
gotoxy(20,12);writeln('le maximum du jour est : ',j);
if j1<j then begin a2:=a1;m2:=m1;j2:=j1+1;end
else if m1<>12 then begin a2:=a1;m2:=m1+1;j2:=1;end
else begin a2:=a1+1;m2:=1;j2:=1; end;
{L`AFFICHAGE DE LA DATE}
gotoxy(20,14);writeln('la date de demain est : ',a2,'/ ',m2,'/ ',j2);
readln;
end.