Question: Question:A number n>0 is called cube-powerful if it is equal to the sum of the cubes of its digits. Write a function named isCubePowerful that

Question:A number n>0 is called cube-powerful if it is equal to the sum of the cubes of its digits. Write a function named isCubePowerful that returns 1 if its argument is cube-powerful; otherwise it returns 0.
E.g. If n is 153 then the function returns 1 because 153=1^3+5^3+3^3
If n is 370 then the function returns 1 because 370=3^3+7^3+0^3
If n is 87 the the function returns 0 because 87!=8^3+7^3

(need c programming code)

Step by Step Solution

3.47 Rating (173 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!