Advertisement
LeTuanAnh

Chia tien

Oct 9th, 2015
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.     int n;
  5.     cout << "Nhap n: ";
  6.     cin >> n;
  7.     cout << "So to 10d " << n / 10 << endl;
  8.     n %= 10;
  9.     cout << "So to 5d " << n / 5 << endl;
  10.     n %= 5;
  11.     cout << "So to 2d " << n / 2 << endl;
  12.     n %= 2;
  13.     cout << "So to 1d " << n << endl;
  14.     system("pause");
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement