Advertisement
a53

suma_prefixe

a53
May 16th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n;
  7. cin>>n;
  8. long long S=0;
  9. while(n>0)
  10. S=S+n,n=n/10;
  11. cout<<S;
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement