SOURCE CODE OUTPUT
#include<iostream>
using namespace std;
int main()
{
int num,num1;
cout<<"Enter number ";
cin>>num;
num1=num;
if(num<0)
num=-num;
cout<<"Absolute value of "<<num1<<" = "<<num;
}
using namespace std;
int main()
{
int num,num1;
cout<<"Enter number ";
cin>>num;
num1=num;
if(num<0)
num=-num;
cout<<"Absolute value of "<<num1<<" = "<<num;
}
Any questions regarding to program please write in comments.
No comments:
Post a Comment