#include<iostream>
using namespace std;
#define AND &&
int main()
{
float n1,n2,sum;
cout<<"enter the number n1";
reenter:
cin>>n1;
if(n1==0)
{ cout<<"reenter the number n1 "<<endl;
cout<<"reciprocal of zero is not define";
goto reenter;
}
n2=1/n1;
sum=n1+n2;
cout<<"sum of two reciprocal number is "<<sum<<endl;
using namespace std;
#define AND &&
int main()
{
float n1,n2,sum;
cout<<"enter the number n1";
reenter:
cin>>n1;
if(n1==0)
{ cout<<"reenter the number n1 "<<endl;
cout<<"reciprocal of zero is not define";
goto reenter;
}
n2=1/n1;
sum=n1+n2;
cout<<"sum of two reciprocal number is "<<sum<<endl;
No comments:
Post a Comment