Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- problema 127
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,a,s=0;
- cin>>n;
- while (n!=0){
- cin>>a;
- while (a>9){
- a=a/10;
- }
- s=s+a;
- n--;
- }
- cout<<s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement