Advertisement
akurczyk

Untitled

Apr 2nd, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. int aaa = 5055;
  2. int p1 = aaa % 10;
  3. int p2 = ((aaa - p1) % 100) / 10;
  4. int p3 = ((aaa - p2-p1) % 1000) / 100;
  5. int p4 = ((aaa - p3-p2-p1) % 10000) / 1000;
  6. cout << p1 << endl << p2 << endl << p3 << endl << p4;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement