"Printf not declared in this scope" even with the use of #include [closed]

Closed. this question is out of scope and is not currently accepting answers.

want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 2 years ago .

improve this question

Why am I getting the error message:

[Error] 'prinft' was not declared in this scope

Related to line 22 of the code below, if the first thing I did was declare:

#include <stdio.h>.

I'm using the Dev C++IDE.

#include <stdio.h>
#include <math.h>

int main()
{
    float a,b,c;
    float delta;
    float raiz1;
    float raiz2;

    a = -1;

    b = 1;

    c = -2;

    delta = (b*b) - 4.0 * a * c;
    raiz1 = (- b + sqrt(delta)) / (2.0 * a);
    raiz2 = (- b - sqrt(delta)) / (2.0 * a);

    if (delta < 0){
        prinft("Não ha raizes reais");
    }
    else {
        printf("A primeira raiz e : %f \n\nA segunda raiz e : %f \n\n",raiz1,raiz2);
    }

}
 1
Author: Leandro Souza, 2018-09-06

1 answers

Inside stdio there is printf() but not prinft(), as the error determines. When you see an error message read it carefully.

 1
Author: Maniero, 2018-09-06 19:47:48