-moz-user-select:none; -webkit-user-select:none; -khtml-user-select:none; -ms-user-select:none; user-select:none;

Tuesday 17 March 2015

Program to get the absolute number

Here in this program I will tell you how to make a make a number absolute entered by the user.

Source code

#include<iostream.h>
#include<conio.h>
void main( )
{
int n;
cout<<"Enter any number=";
cin>>n;
if(n<0)
cout<<Absolute number="<<-n;
else
cout<<"Absoulte number="<<n;
getch( );
}

Output


No comments:

Post a Comment