Saying that you should "Never use system" is wrong, there is no "other way to look at it" it is an incorrect statement. The "System()" function works perfectly for what it does and that is pass commands to the shell, in this case it passes "cls" which to 'cmd.exe' means clear the screen. It's true that it's not the best tool for the job but you should always be aware that it exists.
Like Albatross said it is also true that the console, in most cases, should not be cleared so that's something to consider as well.
system() is a C leftover. But it doesn't just come from a different place, it comes from a different time. As it's already been said, you shouldn't (need to) use it.
just suggest a mod. need to check for zero. and it can be shortened even more then that by moving the math right into the cout function. but im assuming your practicing functions so..
int Addition(int x, int y)
{
return x + y;
}
int Subtraction(int x, int y)
{
return x - y;
}
int Division(int x, int y)
{ // dont divide by zero
if (int x = 0 || y == 0)
return 0;
return x / y;
}
int Multiply2(int x, int y)
{ // anything times zero is zero
if ( x == 0 || y == 0)
return 0;
return x * y;
}