fork download
  1. class Ideone {
  2. public static void main (String[] args) {
  3. int num = 1234;
  4. int tmp = 0;
  5. for (int column = 1; num > 0; column *= 10) {
  6. tmp += (num % 10) * column * 2;
  7. num /= 10;
  8. }
  9. System.out.println(tmp);
  10. }}
Success #stdin #stdout 0.06s 32600KB
stdin
Standard input is empty
stdout
2468