Skip to content

Instantly share code, notes, and snippets.

@mewelling
mewelling / ruc_calc.js
Created February 20, 2019 14:12
Paraguay Cédula + RUC calculation
/*
To calculate the RUC number for your cedula:
Starting with the rightmost digit, multiply it by 2.
Then, multiply the next digit by 3 and add it to the first result.
Then, multiply the next digit by 4 and add it to the running total.
... keep doing this.
Finally, take the remainder of the the total divided by 11 (called the modulo),
and subtract it from 11.
original inspiration: http://www.necesitomas.com/digito-verificador