填空题 下列函数的功能是 【7】
#include<iostream. h>
int Func(int a,int b)

if (a>b) return 1;
else if(a==b) return 0;
else return -1;


  • 1、
【正确答案】 1、比较两个整数a和b的大小,若a>b则返回1,若a等于b,则返回0,否则返回-1。    
【答案解析】