Advertisement
a53

suma37

a53
Dec 6th, 2021
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. unsigned int n,c,s=0;
  7. cin>>n;
  8. while(n)
  9. {
  10. c=n%10;
  11. if(c>=3&&c<=7)
  12. s+=c;
  13. n/=10;
  14. }
  15. cout<<s<<'\n';
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement