fork(8) download
  1.  
  2. COD_NUM = 55480;
  3. COD = COD_NUM+"";
  4.  
  5. A = parseInt(COD.charAt(0));
  6. B = parseInt(COD.charAt(1));
  7. C = parseInt(COD.charAt(2));
  8. D = parseInt(COD.charAt(3));
  9. E = parseInt(COD.charAt(4));
  10.  
  11. S = (6 * A) + (5 * B) + (4 * C) + (3 * D) + (2 * E);
  12. DIGV = S % 7;
  13.  
  14. print('COD:', COD_NUM);
  15. print('S:', S);
  16. print('DIGV:', DIGV);
  17.  
Success #stdin #stdout 0s 172608KB
stdin
Standard input is empty
stdout
COD: 55480
S: 95
DIGV: 4