Guest User

Untitled

a guest
Jan 24th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. # inlude <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n, n1, rem, num=0;
  6.  
  7. cout<<"Enter a positive integer: ";
  8. cin >> n;
  9. n1 = n;
  10.  
  11. while(n1!=0)
  12. {
  13. rem=n1%10;
  14. num+=rem*rem*rem;
  15. n1/=10;
  16. }
Add Comment
Please, Sign In to add comment