2011-09-17, 09:32 PM
Hey all,
A little background: I did some coding in Java whenever I was in high school, my Junior year, so I'm not completely new to the trade. However, three-four years is quite a long time to remember something when you never practiced it in between then and now.
I'm now taking a Structured Programming in C class, and am having a bit of trouble with a rather simple program.
Code:
Output:
Now, I know what I want it to do, and I had it working whenever I misunderstood the question, but working on it the other day I managed to screw it up. I need to convert pounds and ounces to kilograms and grams. I have the ounces part commented out because I was trying to do some troubleshooting, which hasn't been working. After inputting 14, the program spits out that lovely... bit.
If you would be able to shed some light onto my dilemma, I'd greatly appreciate it.
Edit: Heh, sorry all. The window size cut off the remaining code. Where it says "g%" it is supposed to say, "grams.",
A little background: I did some coding in Java whenever I was in high school, my Junior year, so I'm not completely new to the trade. However, three-four years is quite a long time to remember something when you never practiced it in between then and now.
I'm now taking a Structured Programming in C class, and am having a bit of trouble with a rather simple program.
Code:
Spoiler
Output:
Spoiler
Now, I know what I want it to do, and I had it working whenever I misunderstood the question, but working on it the other day I managed to screw it up. I need to convert pounds and ounces to kilograms and grams. I have the ounces part commented out because I was trying to do some troubleshooting, which hasn't been working. After inputting 14, the program spits out that lovely... bit.
If you would be able to shed some light onto my dilemma, I'd greatly appreciate it.

Edit: Heh, sorry all. The window size cut off the remaining code. Where it says "g%" it is supposed to say, "grams.",


![[Image: 59r1g.png]](http://i54.tinypic.com/59r1g.png)
![[Image: dgjouq.png]](http://i54.tinypic.com/dgjouq.png)