I haven't done c++ in awhile, but I think because you have the values initiated as 'int' it won't display decimals. So, you have it set up to divide miles by gallons, which gives you less than 1, ergo it displays 0. So I would try switching it to mpg = miles / gallons and see what that gives you.
That should fix it.