How to use % operator for float values in c

前端 未结 6 474
故里飘歌
故里飘歌 2020-12-03 14:30

When I use % operator on float values I get error stating that \"invalid operands to binary % (have ‘float’ and ‘double’)\".I want to enter the integers value only but the n

6条回答
  •  盖世英雄少女心
    2020-12-03 15:24

    If you want to use an int use long long, don't use a format that is non-ideal for your problem if a better format exists.

提交回复
热议问题