Anstrong Number (teeno ka add karna par bhi same aya )
Angstroms Number
int a = 1153;
1 ka cube , 5 ka cube and 3 ka cube.
int a = 153;
int c = 0;
while(a > 0 ){
int b = a%10;
b = b*b*b;
c += b;
a = a/10;
}
System.out.println(c);
Angstroms Number
int a = 1153;
1 ka cube , 5 ka cube and 3 ka cube.
int a = 153;
int c = 0;
while(a > 0 ){
int b = a%10;
b = b*b*b;
c += b;
a = a/10;
}
System.out.println(c);
Comments
Post a Comment