在C语言中 怎样判断三位数中有相同的数字?

发布时间:2021-02-23 14:43:53

在C语言中 怎样判断三位数中有相同的数字?

网友回答

int X=123;
int a,b,c;
a=X/100;
b=X/10%10;
c=X%10;
if(a==b || a==c || b==c)
print(There are same nums);
以上问题属网友观点,不代表本站立场,仅供参考!