Quiz · Methods · lesson 2 of 8
Quiz — a path without return
What happens when this program is compiled and run?
Console.WriteLine(Abs(-7) + " " + Abs(7));
int Abs(int n)
{
if (n < 0)
{
return -n;
}
}What happens when this program is compiled and run?
Console.WriteLine(Abs(-7) + " " + Abs(7));
int Abs(int n)
{
if (n < 0)
{
return -n;
}
}