Xiaofang's question about saving money
ws
ws 2022-06-30 22:41:39
0
2
1018

class WhileDemo2{ public static void main(String[] args){ double dayMoney=2.5; double daySum=0; int dayCount=1; double result=100; while(daySum<=result){ daySum =dayMoney; if (dayCount%5==0){ daySum-=6; } dayCount ; System.out.println(daySum); System.out.println(dayCount); } }}Why is the result 75 days different from the teacher’s

ws
ws

reply all (1)
autoload

Caution while condition

image.png

  • reply Thank you, teacher, for answering your questions. That’s great! ! ! !
    ws author 2022-07-01 12:19:21
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!