This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 21st, 2012  |  syntax: None  |  size: 0.59 KB  |  views: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.  
  7. float a, b, x;
  8.  
  9. printf("_____________________________________________________\n");
  10. printf("Hola, me llamo Kike y vamos a resolver ecuaciones de primer grado\n");
  11. printf("_____________________________________________________\n");
  12.  
  13. printf("Introduzca el valor A");
  14. scanf("%f", &a);
  15. printf("Introduzca el valor B");
  16. scanf("%f", &b);
  17.  
  18. if (a!=0)
  19. {
  20. x=(b*-1)/a;
  21. printf("La solución es %f", x);
  22. }
  23. if (a==0)
  24. {
  25. if (b==0) printf("Solución indeterminada.");
  26. else printf("Solución imposible.");
  27. }
  28.  
  29. system("PAUSE");
  30. return 0;
  31.  
  32. }
clone this paste RAW Paste Data