Aidez moi svp écriture d'un algorithme???
Fermé
samikzr
Messages postés
8
Date d'inscription
mardi 3 janvier 2012
Statut
Membre
Dernière intervention
28 mars 2012
-
12 janv. 2012 à 20:15
zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 - 14 janv. 2012 à 17:35
zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 - 14 janv. 2012 à 17:35
A voir également:
- Aidez moi svp écriture d'un algorithme???
- Écriture facebook - Guide
- Écriture miroir - Guide
- Ecriture italique - Guide
- Ecriture instagram - Guide
- Logiciel algorithme gratuit - Télécharger - Édition & Programmation
3 réponses
leen.net
Messages postés
212
Date d'inscription
lundi 31 janvier 2011
Statut
Membre
Dernière intervention
14 mai 2014
13
Modifié par leen.net le 12/01/2012 à 21:00
Modifié par leen.net le 12/01/2012 à 21:00
Algorithm Date
Variable Real d
Real m
Real a
Begin
Print (" Donner la date: 1:dd 2: mm 3:aaaa")
Input (d) Input (m) Input (a)
If ((a%4=0 AND m=02 AND d=29) OR ( a%4!=0 AND m=02 And d = 28)
then Print ( " 01/ 03 / "+ a)
Else
If (d=31 And (m=01 OR m= 03 OR m=05 OR m=07 OR m=08 OR m=10))
then m<--m+1
Print (" 01 / "+ m + a)
End If
If (d=30 AND (m=04 OR m=06 OR m =09 OR m=11))
then m<-- m+1
Print (" 01/ "+m +a)
End If
If (d=31 AND m=12)
then a<--a+1
Print (" 01/ 01 / "+ a)
End If
End If
End
Variable Real d
Real m
Real a
Begin
Print (" Donner la date: 1:dd 2: mm 3:aaaa")
Input (d) Input (m) Input (a)
If ((a%4=0 AND m=02 AND d=29) OR ( a%4!=0 AND m=02 And d = 28)
then Print ( " 01/ 03 / "+ a)
Else
If (d=31 And (m=01 OR m= 03 OR m=05 OR m=07 OR m=08 OR m=10))
then m<--m+1
Print (" 01 / "+ m + a)
End If
If (d=30 AND (m=04 OR m=06 OR m =09 OR m=11))
then m<-- m+1
Print (" 01/ "+m +a)
End If
If (d=31 AND m=12)
then a<--a+1
Print (" 01/ 01 / "+ a)
End If
End If
End
En quel langage veux-tu qu'il soit écrit ? ...
samikzr
Messages postés
8
Date d'inscription
mardi 3 janvier 2012
Statut
Membre
Dernière intervention
28 mars 2012
13 janv. 2012 à 20:57
13 janv. 2012 à 20:57
C++
zipe31
Messages postés
36402
Date d'inscription
dimanche 7 novembre 2010
Statut
Contributeur
Dernière intervention
27 janvier 2021
6 407
14 janv. 2012 à 17:35
14 janv. 2012 à 17:35
13 janv. 2012 à 20:58
13 janv. 2012 à 21:02
13 janv. 2012 à 21:14