c语言程序题,编写函数,判定他的四个整数参数中是否含有两个数的值相等。

如题所述

int func(int a,int b ,int c,int d)//返回1表示有两个参数的值相等,返回0则表示没有。
{
if(a==b || a==c ||a==d||b==c||b==d||c==d)
return 1;
else
return 0;
}
温馨提示:答案为网友推荐,仅供参考
相似回答