"Printf not declared in this Scope" even with the use of #include <stdio. h>

Asked

Viewed 605 times

1

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 am using 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 answer

1

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

  • Facepalm! thanks for the reply!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.