60 560
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #16000 in Action Script | Flash | Flex | ColdFusion for wwktnnr

Question #16000
Given that n refers to a positive int use a while loop to compute the sum of the cubes of the first n counting numbers, and associate this value with total . Use no variables other than n , k , and total .
Expert's answer
onSelfEvent (load) {
total=0;
n=0;
k=0;
a = 1;
while (a++ < 5) {
total+=Math.pow(a,3);
trace("Nmmber "+a+"^3= "+Math.pow(a,3));
}
trace("Total="+total);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions