{
int maxNum = arr[0];
for (int i = 1; i < count; i++)
{
if (maxNum<arr[i])
{
maxNum = arr[i];
}
}
return maxNum;
}
int main(void)
{
int numArr[3] = { 3, 8, 6 };
cout << getMax(numArr[2], 100) << endl;
cout << getMax(numArr,3)<< endl;
system("pause");
return 0;
}
int maxNum = arr[0];
for (int i = 1; i < count; i++)
{
if (maxNum<arr[i])
{
maxNum = arr[i];
}
}
return maxNum;
}
int main(void)
{
int numArr[3] = { 3, 8, 6 };
cout << getMax(numArr[2], 100) << endl;
cout << getMax(numArr,3)<< endl;
system("pause");
return 0;
}