between 100 and 999,there are some numbers that has certain characteristics that if you cube the individual digits and sum together you should get the same number
1
Expert's answer
2013-02-27T06:42:32-0500
# include <iostream> using namespace std;
int main(){ /*between 100 and 999,there are some numbers that has certain characteristics that if you cube the individual digits and sum together you should get the same number*/
for (int num=100;num<999;num++){
int temp=num; int s=0; while (temp>=1){
s+=(temp%10)*(temp%10)*(temp%10); temp/=10; } if (s==num) cout<<num<<"& "; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment