using namespace std;
long add(long,long);
float add(float,float);
int main ()
{
long a,b,c;
float x,y,z;
cout<<" Enter two integers to get the sum "<<endl;
cin>> a>>b;
c=add(a,b);
cout<<"Sum of the integers is = "<<c<<endl;
cout<<"Enter two floting point numbers to get the sum "<<endl;
cin>>x>>y;
z=add(x,y);
cout<<"sum of the floting point numbers is = "<<z<<endl;
return 0;
}
long add(long a, long b)
{
long sum;
sum=a+b;
return sum;
}
float add(float x, float y)
{
float sum;
sum=x+y;
return sum;
}
No comments:
Post a Comment