public class Main {
public static void main(String[] args) {
int population = 10000000;
int born = 14;
int death = 8;
int difference = born - death;
for (int i = 0; i <= 10; i++) {
population += (population * difference) / 1000; // добавляем прирост к популяции
}
System.out.println(population);
}
}
public static void main(String[] args) {
int population = 10000000;
int born = 14;
int death = 8;
int difference = born - death;
for (int i = 0; i <=10; i++) {
population += population + 6 / 1000;
}
System.out.println(population);
}
}
почему в итоге получается отрицательное число -994836480?