#include <iostream>
using namespace std;int main()
{
int a, b, s = 0;
cout << "Introdu numerele:";
cin >> a >> b;
if (b < 0)
{
for (int i = 1; i <= abs(b); i++)
{
s += abs(a);
}
cout << a << " * " << b <<" =" << s;
}
if (b>0)
{
for (int i = 1; i <= b; i++)
{
s += a;
}
cout << a << " * " << b <<" =" << s;
}
return 0;
}