You should put some thought into the problem before trying to write code. Code is not the solution. Code is an implementation of the solution. If you had to convert a dollar amount to another currency WITHOUT code, how would you do it? You'd multiply the amount by the conversion rate, wouldn't you? That should be obvious and doesn't take any programming experience at all. Are you really saying that you need help writing code to multiply two numbers together?
This is an example of what Skydiver was talking about earlier. Break the problem down and solve it step by step. Going from a vague idea directly to code is the antithesis of that. You need to work out what the code has to do first and that part doesn't take any programming experience. Once you know what the code has to do - not just the result but the steps to get there - then you can actually write code to do it. If the code doesn't produce the expected results, you can compare each line of code to the step in your algorithm it is supposed to be implementing to see whether they match. If you need help from us, you can show us the code and the algorithm and tell us exactly where they don't match up.