here is my code:-
#include<math.h>
int main()
{
float a,b,c,discriminant,root1,root2;
printf("input values of a,b, and c\n");
scanf("%f %f %f",&a,&b,&c);
discriminant = b*b - 4*a*c;
if (discriminant<0)
printf("\n\nROOTS ARE IMAGINARY\n");
else
{
root1=(-b+sqrt(discriminant))/(2.0*a);
root2=(-b-sqrt(discriminant))/(2.0*a);
printf("\n\nroot1=%5.2f\n\nroot2=%5.2f\n,root1,root2");
}
return 0;
}
it shows the following warnings.
warning: implicit declaration of function 'printf'|
warning: incompatible implicit declaration of built-in function 'printf'|
warning: implicit declaration of function 'scanf'|
warning: incompatible implicit declaration of built-in function 'scanf'|
warning: too few arguments for format|
||=== Build finished: 0 errors, 5 warnings ===|
though the program still runs i want to know what those warnings mean and i want to rectify them