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