Advertisement
RayanRam

Equation second ordre Algo V2

Nov 29th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Algorithme Equation
  2.  
  3. variables : a,b,c,Delta,X : entier;
  4. Debut
  5. Ecrire("Donnez a");
  6. Lire(a);
  7. Ecrire("Donnez b");
  8. Lire(b);
  9. Ecrire("Donnez c");
  10. Lire(c);
  11. Delta<-(b*b)-(4*a*c);
  12. si(Delta>=0)
  13. alors
  14. X<-((-1)*b+sqrt(Delta))/2*a;
  15. Ecrire("solution numero un : ",X);
  16. X<-((-1)*b-sqrt(Delta))/2*a;
  17. Ecrire("solution numero deux : ",X);
  18. sinon
  19. Ecrire("Pas de solution");
  20. fsi
  21. Fin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement