Programmation sur Casio Graph 35+

Fermé
cachou1992 Messages postés 1 Date d'inscription samedi 5 février 2011 Statut Membre Dernière intervention 5 février 2011 - 5 févr. 2011 à 14:16
bjour Messages postés 6068 Date d'inscription lundi 11 janvier 2010 Statut Contributeur Dernière intervention 2 mai 2022 - 12 févr. 2011 à 09:59
Bonjour,

J'aurais besoin de votre aide pour de la programmation sur Casio graph 35+ :

1)
Saisir N
Si N est pair alors
N/2?P
sinon 3xN+1?P
Fin Si
Afficher P

2)
Saisir N
3?P
Pour I allant de 1 à N faire
A+12?A
Fin Pour
Afficher A

Merci beaucoup

1 réponse

bjour Messages postés 6068 Date d'inscription lundi 11 janvier 2010 Statut Contributeur Dernière intervention 2 mai 2022 4 065
12 févr. 2011 à 09:59
pour le 1:
? -> N
If N/2 = Int(N/2)
Then N/2 -> P
Else 3N+1 -> P
IfEnd
P



pour le 2:
(il faut peutêtre rajouter la commande qui met A à zéro au début non? 0->A)
? -> N
3 ->P
For 1 -> I To N
A+12 -> A
Next
A



pour bien comprendre, tu peux aller sur le SITEDUZERO, ils ont un très bon tuto
8