Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/05/2011, 19:49
_Lx
 
Fecha de Ingreso: mayo-2011
Mensajes: 17
Antigüedad: 13 años, 9 meses
Puntos: 11
Busqueda Respuesta: Necesito que me salga y=x^2-2x+3


Mmm ... ¿Que te salga: "y = x^2-2x+3"?
Código C++:
Ver original
  1. cout << "y = x^2-2x+3" << endl;
xD!

Y esto ...
Código C++:
Ver original
  1. float x, y;  // float = reales.
  2.  
  3. cin >> x;
  4. setbuf( stdin, NULL);  // Limpia la basura del buffer.
  5.  
  6. y = x * x - 2 * x + 3;
  7.  
  8. cout << "En la ecuacion: Y = x^2-2x+3, con X = " << x << ", el valor de Y, es: " << y << endl;

Nos vemos.