You are viewing a single comment's thread from:

RE: Help me with this JAVA bug!

in #java6 years ago

The logic should be:
while(n!=0)
(
b=n%10;
a=a+Math.pow(b,3);
n=n/10;
)
Sorry I don't have flowerbrackets on my keyboard so used round brackets for encapsulating the block.
This is my 9th grade problem so I still remember. This will work. And good to see a person with so much interest to learn programming. You can ask me questions related to programming whenever you want. All the best buddy. It will work.

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.029
BTC 60865.75
ETH 2381.36
USDT 1.00
SBD 2.57