-1
I am trying to correct and always erring in the same place, always with the if
and the else
or between them. The problem always occurs with other codes.
#include <stdio.h>
#include <stdlib.h>
int main ()
{
float a, b, c, deslta, x1, x2, raiz;
printf ("Apesente os valores: ");
scanf ("%f", &a);
scanf ("%f", &b);
scanf ("%f", &c);
if (a = 0);
printf ("Nao e uma equação do 2 grau\n");
else
delta=b^2 – 4*a*c
if delta < 0
printf ("Equacao nao possui raizes reais\n");
else
raiz=sqrt(delta);
x1=(-b+raiz)/(2*a);
x2=(-b-raiz)/(2*a);
printf ("“O valor de X1 e X2 são: ", x1, x2);
}
the following code is displaying the [Error] Stray ' 226' in program which could be ?
– matheus ferreira
In delta = bb - 4a*c; corrects the operator -. (- is different from -)
– user4552