#include <stdio.h>
/* function declaration */
int max(int num1, int num2);
int main () {
/* local variable definition */
int a = 100;
int b = 200;
int ret;
/* 调用函数 */
ret = max(a, b);
printf( "Max value is : %d/n", ret );
return 0;
}
/* function returning the max between two numbers */
int max(int num1, int num2) {
/* local variable declaration */
int result;
if (num1 > num2)
result = num1;
else
result = num2;
return result;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265134.html