0
Have an error! Could someone pls? && Does it really need of fabs ().
#include <stdio.h> int main() float true_val,approx_val; float ea,er,ep; //input: Enter true value & approximate value //scanf("%f",&true_val); //input: Enter approximate value //scanf("%f",&approx_val); scanf("%f%f",&true_val&approx_val); ea=fabs(true_val - approxx_val ); er=ea/true_val; ep=er*100; printf("\n Absolute Error is : ",ea); printf("\n Relative Error is : ",er); printf("\n Precentage Error is : ",ep); return 0; }
4 ответов
+ 3
{ missing after int main ()
Line 14: separate &true_val and &approx_val with a comma
Line 15: use same spelling for your variables all the way through
Line 18-20: format specifiers missing (%.2f etc.)
+ 2
missing math.h include in addition of errors mentioned by Anna
0
puh! sometimes 😀😀
well gracious sirs.
thanks a lot I been wondering for this like an idiot. 😊😊
0
if I run this program after debugging, it only ask for input once. But it should ask twice coz there are two inputs required.