Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
floating point exception occurs...Why??? I'm using integers
//calculating mpg int gallons = 0; int *gallonpointer = &gallons; *gallonpointer = gallonsused; NSLog(@"How many gallons did you use?"); scanf ("%i", &gallons);
int total; total = milesdriven/gallonsused; NSLog(@"Your mpg: %i", total);
//I did not paste remaining code for this method call
Here's my output from Terminal:
Last login: Fri Mar 19 11:48:54 on ttys001 karen-haqs-imac:~ karenhaq$ /Users/karenhaq/Objective-C/GasMileage/build/Debug/GasMileage ; exit; 2010-03-19 11:52:10.895 GasMileage[55145:10b] How many miles did you drive? 40 2010-03-19 11:52:21.721 GasMileage[55145:10b] How many gallons did you use? 10 Floating point exception logout