Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void sum_cif(int x,int &suma)
- {
- while (x)
- { suma=suma+x%10;
- x/=10;
- }
- }
- int main()
- {
- int suma=0;
- sum_cif(53223,suma);
- cout<<suma;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement