Answers

2014-08-12T16:08:04+05:30
#include <iostream>
using namespace std;

int smallest(int a, int b)
{
return (a<b) ? a:b;
}

float smallest(float a, float b)
{
return (a<b) ? a: b;
}

int main()
{
cout<<smallest(10,20)<<endl;
cout<<samllest(10.2,20.2)<<endl;
return 0;
}
 
1 3 1
Mark me as brainiest if u find it more useful
Also use class, that will be nice as question asks for implementation of class and function overloading
2014-08-21T15:36:32+05:30

This Is a Certified Answer

×
Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
#include <iostream.h>
 class Smaller {
 public:
  int smaller(int x, int y)
 {
   return x < y ? x : y;
  }
   float smaller(float x, float y)
{
    return x < y ? x : y;
  }
}
void main()
 {
  int x = 45;
  int y = 17;
   cout << Smaller().smaller(x, y) << endl;
   float p = 7.443f; float q = 11.11111f; cout << Smaller().smaller(p, q) << endl;
   getch();
 }
0
are you a regular programmer ??
no
check out my code, once... if u are answering, must answer the exact thing, questioner asking....
and there are rules for syntax and other thing, u must follow those rules
2014-08-21T15:45:43+05:30
I've attached the code, check it out.....
0