float score; if ( int(score)-score!=0 ) ... 这样输入提示错误我想判断score是不是整数怎么办
答案:3 悬赏:20
解决时间 2021-03-14 14:54
- 提问者网友:久伴不朽
- 2021-03-13 22:39
float score; if ( int(score)-score!=0 ) ... 这样输入提示错误我想判断score是不是整数怎么办
最佳答案
- 二级知识专家网友:承载所有颓废
- 2021-03-13 23:38
double score;
if((int)x==x)
printf("%f是整数",x);
if((int)x==x)
printf("%f是整数",x);
全部回答
- 1楼网友:恕我颓废
- 2021-03-14 02:24
if((int)score-score==0)
printf("score是整数");
- 2楼网友:茫然不知崩溃
- 2021-03-14 00:58
int search( int (*score) [4],int n) 应该是传入一个指针数组吧,int search( score, num ); 只传入了一个数。
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯