this program is supposed to add up the integers in a number entered by a user and print out the sum. i got the easy part down.
if(number<10) { sum=number; }
for the next part i was thinking about storing the value of each integer in an array by using mod operator then then addin them all up. any suggestions or psuedo code to help???


LinkBack URL
About LinkBacks
Reply With Quote
by clicking the
button on their useful posts. 
first of all declare your variables above your main method I can't remember if you are allowed to declare them elsewhere but if you are it's still good practice to put them at the start of the class.