关于C语言中的求余的问题

2025-04-08 01:42:52
推荐回答(1个)
回答1:

0.01*(n-dse)
这个是一个double类型的,不能使用
%
你可以写成
sec
=
(int)(0.01*(n-dse))
%
60;

sec=((n-dse)/100)%60;