Alx09

Untitled

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