// © Copyrights 2026 Praajna Pattada

#include <iostream>
#include <limits>
using namespace std;

float a {};
float b {};
float c {};
int d {};

float Multiply(float x, float y)
{
    cout << '\n' << "Multiplying decimal values.";
    return (x * y);
}

int Multiply(int x, int y, bool isInteger)
{
    cout << '\n' << "Multiplying integer values.";
    return (x * y);
}

int main()
{
    cout << "Enter any number to multiply: ";
    cin >> a;
    cout << "Enter another number: ";
    cin >> b;
    c = Multiply(a, b); // Calls the function of datatype float, as there are only two arguments and c is also a float
    d = Multiply(a, b, true); // Calls the function of datatype int, since this has three arguments and so, the decimal values are converted to integers, ignoring the digits after the decimal point.
    cout << '\n' << "You have entered " << a << " and " << b << '\n';
    cout << "Their product is" << '\n' << c << " (as a decimal value)" << '\n' << d << " (as an integer value)" << '\n';
    
    cin.clear();
    cin.ignore(numeric_limits<streamsize>::max(), '\n');
    cin.get();
    return 0;
}
