dimanche 31 juillet 2016

I am trying to get single digit precision using Math.round [duplicate]

This question already has an answer here:

My code:

double protein = ap.nextDouble("The number of grams of protein in this food");      
double proteinCalorie = (double) Math.round(protein * 4);

Aucun commentaire:

Enregistrer un commentaire