No. Read what deceptikon said, work at understanding his meaning, and fix your code.
Or try following your code with paper and pencil to see what the values are doing. This is called debugging and is a critical component of programming.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
I repeat
... try following your code with paper and pencil to see what the values are doing. This is called debugging and is a critical component of programming.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Well, I keep moving the code blocks around. It does not work.How do I change the gallon variable since all I can do is Input number. Gallon does not have a specific value that is assigned to it.
printf( "Enter gallon used (-1 to end): " );
scanf( "%d", &gallon);
did you try putting these statements inside the loop....
With all the replies I think enough hint is given already :-/
zeroliken
Veteran Poster
1,106 posts since Nov 2011
Reputation Points: 201
Solved Threads: 162