Actually this will not work if you directly translate it. I know x,y,z are integers and # is the user input, but the problem is you are storing y as a single variable, maybe like (a number)^2, and not changing its value with count. Pseudo code is pseudo code,but if you get the concept and know the syntax, just work it out. So in this code, if y= say 1^2, sumsquare = 5 if #=5, and not 55, so look to that.
0 comments:
Post a Comment