Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- #include <cmath>
- using namespace std;
- void vvod(int n,int k)
- {
- while (k>0){
- cout << n/k<<endl;
- n=n%k;
- k/=10;
- }
- }
- void colichestvo (int n){
- int k=1, g=n;
- while (n/10>0){
- k*=10;
- n/=10;
- }
- vvod(g,k);
- }
- int main()
- {
- int n;
- cin >> n;
- colichestvo(n);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement