im writing a program about a zombie apocolypse. i have random numbers generated at the beggining for the population of zombies and humans. i need to display the ratio of humans to zombies..... how does one do this? o.o; thank u for any help ^^
Printable View
im writing a program about a zombie apocolypse. i have random numbers generated at the beggining for the population of zombies and humans. i need to display the ratio of humans to zombies..... how does one do this? o.o; thank u for any help ^^
So you already have the numbers?
Ok, well take your humans and divide it by zombies.
Code:double ratio = (double)humans / (double)zombies;