Monday 28 January 2013

For always show positive number...

#include<iostream>
#include<conio.h>
#include<cmath>
using namespace std;
void main()
{
int p;
cout<<"Enter P number";
cin>>p;
cout<<"The Positive Number is "<<abs(p);
getch();
}



  • abs( ) is a function

No comments:

Post a Comment