Friday, 26 January 2018

Write a simple program that multiplies two numbers and then also divides the two numbers.(Use Inline Functions)

#include<iostream>
using namespace std;

inline float mul (float x,float y )
{
    return(x*y);
}
inline float div (float m,float n )
{
    return(m/n);
}
int main()
{
    float a,b;
    cout<<"Enter the a & b: ";
    cin>>a>>b;
    cout<<"\nmultiplication is: "<<mul(a,b)<<"\n";
    cout<<"\ndivision is: "<<div(a,b);
    return 0;
}

No comments:

Post a Comment

It's time To increase blogging capability. To have a chance to contribute in digital world. Any Interested People who want to make t...