Dear all,
I am a newbie in C. Just come across function prototype.
I have a task in write a function prototype for:
- A function that finds the larger of two numbers and returns the result
and i write the following.
#include <stdio.h>
/* Function Definition, I do not know whether it is as simplified as definition only*/
void findbig(int num1, int num2)
{
If (num1>num2);
Printf(“%d”,&num1&“is larger”);
Elseif (num2<num1);
Printf(“%d”,&num2&“is larger”);
Else
Printf(num1&“is equal to”&num2);
}
Int main()
{
Printf(“Compare the 2 numbers”);
Printf(“Please enter the first number”);
Scanf(“%d”,&num1);
Printf(“Please enter the second number”);
Scanf(“%d”,&num2);
}