[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:
2023-05-18 17:30:25 +02:00
parent 5f5a41ff00
commit 0c458c5329
2 changed files with 4 additions and 5 deletions

View File

@@ -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);