prova a sostituire
codice:
perc = parseInt(car * 100 / tot);
con
codice:
perc = Math.round((car/tot)*100);