#include <iostream.h>
#include <math.h> // defines the fabs( ) function
#include <conio.h>
void main ( )
{
float i = -20.56;
cout.precision(2);
cout<<" i = "<<i;
cout<<"\n Absolute value of i = "<<fabs(i);
i = 20.56 ;
cout<<" i = "<<i;
cout<<"\n Absolute value of i = "<<fabs(i);
getch () ;
}
0 comments:
Post a Comment