Algorithme
Fermé
bila
-
29 nov. 2012 à 16:29
Heliotte Messages postés 1491 Date d'inscription vendredi 26 octobre 2012 Statut Membre Dernière intervention 28 janvier 2013 - 29 nov. 2012 à 17:47
Heliotte Messages postés 1491 Date d'inscription vendredi 26 octobre 2012 Statut Membre Dernière intervention 28 janvier 2013 - 29 nov. 2012 à 17:47
Bonjour,
svp comment ecrire un algorithme qui saisit un nombre entier et l'affiche a l'enverse
svp comment ecrire un algorithme qui saisit un nombre entier et l'affiche a l'enverse
A voir également:
- Algorithme
- Logiciel algorithme euromillion - Télécharger - Loisirs créatifs
- Logiciel algorithme gratuit - Télécharger - Édition & Programmation
- Algorithme ajout rapide snapchat - Forum Snapchat
- Ajout rapide snap - Forum Snapchat
- Algorithme euromillion excel gratuit ✓ - Forum VB / VBA
1 réponse
Heliotte
Messages postés
1491
Date d'inscription
vendredi 26 octobre 2012
Statut
Membre
Dernière intervention
28 janvier 2013
92
29 nov. 2012 à 17:47
29 nov. 2012 à 17:47
Bonsoir bila,
Quelque chose comme cela :
Quelque chose comme cela :
Variables: Nombre, i, ENTIER; sEntier, sEntierOut, CHAINE; FONCTION MAIN() Entrée: Lire Nombre; sEntier=CHAINE(Nombre); AFFICHE("Le Nombre à l'envers est : " + RetourneChaine(sEntier)); FIN FONCTION FONCTION CHAINE RetourneChaine(CHAINE sEntier) SI(sEntier=="") ALORS RETOURNE = ""; FIN SI sEntierOut=""; POUR (i=(LONGUEUR(sEntier)-1) ; i<=0 ; i--) sEntierOut=sEntierOut + sEntier(i); FIN POUR RETOURNE sEntier; FIN FONCTION