Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void digitos(int a)
- {
- // TODO Auto-generated method stub
- LinkedList<Integer> stack = new LinkedList<Integer>();
- while (a > 0) {
- stack.push(a % 10);
- a = a / 10;
- }
- while (!stack.isEmpty()) {
- System.out.print(stack.pop() + " ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement