C
Programming and Technical
Programming
Program
integer x = 0 // statement 1
integer sum = 0 // statement 2
while ( x < 10 ) // statement 3
{
sum = x*x*x // statement 4
x = x + 1 // statement 5
}
print sum // statement 6
Read Solution (Total 7)
-
- Here, sum = 9*9*9
So , sum= 729 - 8 years agoHelpfull: Yes(5) No(2)
- sum value is changed every time loop is executed. when x=9, sum=729 and if x=10 loop terminates and final sum value is displayed.
- 7 years agoHelpfull: Yes(3) No(0)
- sum=729
sum=9*9*9 - 8 years agoHelpfull: Yes(2) No(1)
- for x=0
sum=0*0*0=0
x=0+1=1
then for x=1
sum=1*1*1=1
x=2 and so on
for x=9 - 7 years agoHelpfull: Yes(2) No(1)
- 721.loop is run by 9 times so sum=9*9*9
- 7 years agoHelpfull: Yes(0) No(1)
- Is that print syntax is correct?? Clarify me plz
- 6 years agoHelpfull: Yes(0) No(0)
- given x=0; sum=0
0 - 5 years agoHelpfull: Yes(0) No(0)
C Other Question