[Ex1 - Q1] Modification de la précision
Affichage de 2 chiffres après la virgule pour la densité mondiale moyenne et modification du README
This commit is contained in:
@@ -4,4 +4,4 @@ population = sum(data(:, 3)*1000000);
|
||||
densite = population / surface;
|
||||
mprintf("Surface terrestre mondiale : %d km²\n", surface);
|
||||
mprintf("Nombre d''habitants mondial : %.0f habitants\n", population);
|
||||
mprintf("Densité moyenne : %.0f habitants/km²\n", densite);
|
||||
mprintf("Densité moyenne : %.2f habitants/km²\n", densite);
|
||||
|
||||
Reference in New Issue
Block a user