(2 points) Write a function prototype for a function called findLarge. It takes
ID: 3529589 • Letter: #
Question
(2 points) Write a function prototype for a function called findLarge. It takes two integers as its arguments and returns an integer. (2 points) Write a function header for a function called findLarge. It takes two integers as its arguments (named val1 and val2) and returns an integer. (2 points) Write a complete function called findLarge that will return the larger of two integers. It takes two integers (the values to be compared) as its arguments. (2 points) Write a complete function called calcTriArea that will calculate and return the area of a triangle. It takes two float/double values: the base and height as its arguments. The area of a triangle is one-half the base times the height.Explanation / Answer
int findLarge(int val1,int val2);
int findLarge(int val1,int val2)
{
if(a>b)
return a;
else
return b;
}
float calcTriArea(float height,float base)
{
float area=(base*height)/2;
return area;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.