Hello everyone,
Background: I am currently attempting a project for a professor of mine, but I cannot integrate my formula properly into my code. The project calls for a conversion from numbers to words. (I last worked in C++ a year and a half ago, so any words that don't make sense in syntax are placeholders so I understand what I was trying to do when I have a chance to look up the proper functions later) I know how I want to isolate each number, and also how to have it export it. The problem I run into is with my IF statements when I am trying to extract the respective numbers.
Assuming the number I am searching for is 15824.23, I would first take off the .23 and deal with it at the end of the equation, and then turn the 15824 -> _15 824
I would take the 824, extract the 4 through mod then divide by 10 so it would truncate off the 4, mod by 10...rinse and repeat until I got each number. After I finished my first group of 3, I would move onto my next group of 3 until I ran out of numbers to extract basically.
<---code snipped--->
Any suggestions on how to best execute this would be appreciated, again I do not want the work done for me, I simply want some tips on the best ways to go about this.
Thanks, CSStudent728
EDIT: I realize it is very incomplete what I have posted (coding wise), but I am at a roadblock at the moment and I am unsure the best way to proceed.
OK, you described what you do, but you didn't explain what your problem is. You need to describe your difficulty in detail, not make us read and understand your code to find flaws. You already know them. Tell us what you expected and what actually happened.