OPERATOR OVERLOADING
// Online C++ compiler to run C++ program online
#include <iostream>
using namespace std;
int operation(int a,int b)
{
return (a*b);
}
float operation(float c,float d)
{
return(c*d);
}
int main()
{
int s=10,r=2;
float x=9,y=78;
cout<<operation(s,r);
cout<<"\n"<<operation(x,y);
int nit=operation(s,r);
float iit=operation(x,y);
float vit=nit+iit;
cout<<"\n"<<vit;
}
Comments
Post a Comment