问题
填空题
下列函数的功能是 【7】 。
#include<iostream. h>
int Func(int a,int b)
if (a>b) return 1;
else if(a==b) return 0;
else return -1;
答案
参考答案:比较两个整数a和b的大小,若a>b则返回1,若a等于b,则返回0,否则返回-1。
下列函数的功能是 【7】 。
#include<iostream. h>
int Func(int a,int b)
if (a>b) return 1;
else if(a==b) return 0;
else return -1;
参考答案:比较两个整数a和b的大小,若a>b则返回1,若a等于b,则返回0,否则返回-1。