#include
#include
#include
int min(int a, int b, int c)
{
if (a <= b && a <= c )
return a;
else if (b <= a && b <= c )
return b;
else
return c;
system("pause");
}
int max(int a, int b, int c)
{
if (a >= b && a >= c )
return a;
else if (b >= a && b >= c )
return b;
else
return c;
}
int main()
{
int a, b, c;
int y;
std::cout << "Enter a, b,c: ";
std::cin >> a >> b >> c;
y = min(a, b, c) / max(a, b, c);
std::cout << "min/max = " << y << std::endl;
system("pause");
return 0;
}
#include
#include
int min(int a, int b, int c)
{
if (a <= b && a <= c )
return a;
else if (b <= a && b <= c )
return b;
else
return c;
system("pause");
}
int max(int a, int b, int c)
{
if (a >= b && a >= c )
return a;
else if (b >= a && b >= c )
return b;
else
return c;
}
int main()
{
int a, b, c;
int y;
std::cout << "Enter a, b,c: ";
std::cin >> a >> b >> c;
y = min(a, b, c) / max(a, b, c);
std::cout << "min/max = " << y << std::endl;
system("pause");
return 0;
}