The assignment actually tells us that we need to use a brute force method to solve the puzzles. It vaguely describes an algorithm we can implement to accomplish this; finding unique letters, assigning them all possible values 0-9, checking the value of the words against each other.
I'll...
If you've got to dig through old files to figure it out I won't put you through the trouble. I figured out how to use continue and I'm getting the correct answers with much faster computation times, only it is printing out the results twice for some reason. I have enough done at this point...
I changed some things around following some of your advice and now I've got it working in general cases. I was able to calculate the two puzzles I need to (BASE+BALL=GAMES and SEND+MORE=MONEY) using the algorithm I've got. However, it takes a very long time for the solutions to be found...
1. I'm not sure why I had pointers instead of just directly plugging in the values. It's changed now.
2. Since my program has to be more general than just SEND+MORE=MONEY, do you think I should implement some limit to stop the loops once all the unique letters have been assigned numbers?
4...
As far as I can tell that is what I am doing. I must be wrong. Right below I describe the meaning of each line for my "check", below that I have the code combined. Unfortunately, this assignment isn't just the specific case of SEND+MORE=MONEY. It needs to be more general to words with as many...
None of the methods involving nested for loops and hard coding seem to work. I tried it with continue, without continue, using the ! operator, replacing values with pointers, replacing values with variables, etc.
-I wrote a code to test if word 1 + word2 = word3 and it works when I define the...
Alright, I just took some time to re-read all the posts in more detail. I was at school and trying to skim read, which was a poor choice. I apologize to those whose posts I responded to with nonsense.
I used "continue" like Michael used above for my for loops, it worked well when shrinking the...
@Uart
That makes for a much shorter and far clearer code than what I had.
You really helped me out. Thank you!
With that coded I've now got the task of finding unique solutions...I may be back for a little more help.
Thank you again!
Edit: @ Michael Redei
Thank you for the insight.
I...
1.Before I start it is important to say that I only have two months programming experience so my capabilities are limited. I have been working on a C# code to solve general case verbal arithmetic problems, but I ran into some trouble with one part of the algorithm. If you are not familiar with...
I've been trying to figure out where my mistake lies in the first solution. Some help would be appreciated. I did notice I got the same solution twice, so I assume I just calculated dr/dt twice and I need to use a different equation for dh/dt? Is dh/dt=(3/4)*dr/dt?
1. Sand falls from a...