Ajout Ex1 - Question 1
This commit is contained in:
7
resources/scripts/ex1-1.sce
Normal file
7
resources/scripts/ex1-1.sce
Normal file
@@ -0,0 +1,7 @@
|
||||
data = csvRead("resources/data/data.csv");
|
||||
surface = sum(data(:, 2)*1000);
|
||||
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);
|
||||
Reference in New Issue
Block a user