Ratios(begginer)
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Ratios(begginer)

  1. #1
    Join Date
    Oct 2009
    Posts
    1

    Ratios(begginer)

    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 ^^

  2. #2
    Join Date
    Jun 2009
    Location
    oklahoma
    Posts
    199

    Re: Ratios(begginer)

    So you already have the numbers?
    Ok, well take your humans and divide it by zombies.

    Code:
    double ratio = (double)humans / (double)zombies;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center