int a s n count; a=2; s=0; n=1; count=1; whilecount=7 n=na; s=s+n; ++count; printfs=d s; 输出结果:__s=254____ 解释
在这段代码中,变量a的值为2,s的初始值为0,n的初始值为1,count的初始值为1。 在while循环中,n的值每次都会乘以a,然后加到s上。同时,count的值会递增1,直到count的值大于7为止。 在循环结束后,输出s的值,即s=254。
原文地址: http://www.cveoy.top/t/topic/i7Bf 著作权归作者所有。请勿转载和采集!