请问这个while循环结果为什么不对?
问题描述:
程序3.cpptest2.cpp 程序6.cpp test3.cpp 程序2.cpp 程序5.cpp test7.cpp test6.cpp test4.cpp 程序7.cpp
12 #include<stdio.h>
intmain()
S
4 intday,x1,×25
5 day=95
x2=15
7 while(day>8)
8 白
9 x1=(x2+1)*2;
10 X2=x13
11 day--
13 printf(thetotalis%d\n”,x1)
14 return 63
LCUsers zhangchengrDesktog 房试啦程序7.exe
totalis1446784 the 结果好像是错的
x1
exited after 0.05796 seconds with return value 0
答
看代码应该没问题,你是不是代码修改后没有重新编译,运行的exe还是之前的。
重新编译一下代码再运行看看
答
你想要求什么呢,单纯看代码没发现问题,你描述下具体问题要做什么才能帮你调试代码