All rights are reserved by Niteesh Kumar.. Theme images by Storman. Powered by Blogger.

Followers

Total Pageviews

Blog Archive

Follow by Email

Translate

Wednesday, 14 January 2015

multiply and divide using function overloading

#include<iostream.h>

#include<conio.h>


int operate(int a,int b)


{   return(a*b);


}


float operate(float c,float d)


{   return(c/d);


}


void main()


{clrscr();


int a,b;


float m,n;


cout<<"enter a and b  ";


cin>>a>>b;


cout<<operate(a,b);


cout<<"\n";


cout<<"enter m and n  ";


cin>>m>>n;


cout<<operate(m,n);


getch();


}


OUT PUT


enter a and b  45


47


2115


enter m and n  45


47


0.957447

0 on: "multiply and divide using function overloading"