Solution d'un exercice de turbo pascal
Fermé
coeur
-
2 févr. 2009 à 20:49
KX Messages postés 16668 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 17 mars 2023 - 3 févr. 2009 à 14:14
KX Messages postés 16668 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 17 mars 2023 - 3 févr. 2009 à 14:14
A voir également:
- Solution d'un exercice de turbo pascal
- Turbo pascal download - Télécharger - Édition & Programmation
- Pack solution - Télécharger - Divers Utilitaires
- Iphone turbo sim inconvénient - Forum iPhone
- My pascal - Télécharger - Édition & Programmation
- Rébus et solution ✓ - Forum Loisirs / Divertissements
2 réponses
KX
Messages postés
16668
Date d'inscription
samedi 31 mai 2008
Statut
Modérateur
Dernière intervention
17 mars 2023
3 005
3 févr. 2009 à 14:14
3 févr. 2009 à 14:14
program SansNom;
var i,s:integer;
begin
i:=1; s:=1;
while (i<100) do
begin
i:=i+2; // 1, 3, 5, 7...
s:=s+i; // 1, 1+3, 1+3+5, 1+3+5+7...
end;
writeln(s);
writeln; write('Fin du programme. Appuyer sur Entree'); readln;
end.
Stormovik_il2
Messages postés
6
Date d'inscription
lundi 2 février 2009
Statut
Membre
Dernière intervention
2 février 2009
2 févr. 2009 à 21:37
2 févr. 2009 à 21:37
voila le program à peyt pres:
program coeur;
uses wincrt;
var a,b,c :integer ;
begin
reapat
write (' entrer svp le nombre A ( a doit etre inferieru à 100 ):');readln (a);
until (a < 100 ) and (trunc (a/2) = a/2 ) ; ;
reapat
write (' entrer svp le nombre B ( a doit etre inferieru à 100 ):');readln (b);
until (b < 100) and (trunc (b/2) = b/2 ) ;
writeln ('le reslutat est :'s:=a+b) ;
end.
program coeur;
uses wincrt;
var a,b,c :integer ;
begin
reapat
write (' entrer svp le nombre A ( a doit etre inferieru à 100 ):');readln (a);
until (a < 100 ) and (trunc (a/2) = a/2 ) ; ;
reapat
write (' entrer svp le nombre B ( a doit etre inferieru à 100 ):');readln (b);
until (b < 100) and (trunc (b/2) = b/2 ) ;
writeln ('le reslutat est :'s:=a+b) ;
end.