There are two integer variables in our program, hours and days, which represents time. If in the program, we increase the number of hours by one, which of the following lines of code will correctly update days and hours? 我们的程序中有两个整型变量,hours 和 days,它们代表时间。如果在程序中,我们将小时数增加 1,以下哪一行代码可以正确更新 days 和 hours?单项选择题
A
hours = hours % 24;
B
days = days + hours / 24; hours = hours % 24;
C
days = days + hours / 24;
D
days = days + hours % 24; hours = hours / 24;
E
hours = hours + days % 24;
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
var i = 28; if ( i / 2 % 2 > 0 ) { document.write("The number is an odd integer"); } else { document.write("The number is an even integer"); } What is displayed when the code segment above is executed?
What symbol is used to find remainder of a floor division?
In Java, what is the function of the modulo?
Evaluate following code and identify value of variable ans. int inp = 724395, ans; ans = (inp / 100) % 10;
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!