the goal is to assign a unique digit to each letter in the equationin order to m
ID: 3614221 • Letter: T
Question
the goal is to assign a unique digit to each letter in the equationin order to make it true. Use recursion to generate ALLpossible assignments in a systematic way. The input file,input.txt will contain equations of the form(only addition) as theexamples. Assume that each word will have at most 3letters. The output file output.txt should gave equations indigits if there is a solution. If there is no solution, itshould output "no solution" for that, equation. Brute forceis allowed and most likely choice.examples
pot+pan=bib
dog+cat =pig
non+ace=dot (ANS 242+105=347)
the values that can be assigned to the letters are only 0-9 no twodifferent letters can have the same value unless of course it isthe letter itself just as in the example n has value 2 throughoutthe whole equation.
Explanation / Answer
x.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.