DEV Community

Mohammed Salah
Mohammed Salah

Posted on

C++ 11th code(cmath-->abs)

    #include<iostream>
    #include<cmath>
    using namespace std; 
    int main()
    {
int x , y ; 
cout<<" \n \n \t Enter First Number : "; 
cin>>x; 
cout<<" \n \n \t Enter Second Number : ";
cin>>y; 
cout<<" \n \t *******************************************";
cout<<" \n \n \t You have Entered x = "; 
cout<<abs(x);
cout<<" \n \n \t You have Entered y = ";
cout<<abs(y);
cout<<"\n\n\n";
cin.get();
return 0 ; 
    }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)