(Solved) : C Recursive Modify Following Code Add Recursive Function Repeatedly Find Mapped Numbers Sa Q43947209 . . .
C++ recursive.
Modify the following code to add the recursive function torepeatedly find the mapped numbers to satisfy the equation.
code:
#include “proj3.hpp”
#include <map>
#include <string>
using namespace std;
bool puzzleSolver(std::string s1, std::strings2, std::string s3, std::map<char,unsigned> & mapping)
{
std::string Q1=””,Q2=””,Q3=””;
for(std::string::size_typei=0;i<s1.size();++i){
Q1=Q1+std::to_string(mapping.at(toupper(s1[i])));
}
for(std::string::size_typei=0;i<s2.size();++i){
Q2=Q2+std::to_string(mapping.at(toupper(s2[i])));
}
for(std::string::size_typei=0;i<s3.size();++i){
Q3=Q3+std::to_string(mapping.at(toupper(s3[i])));
}
int T1=std::stoi(Q1);
int T2=std::stoi(Q2);
int T3=std::stoi(Q3);
if(T1+T2==T3)
return true;
else
return false;
}
Expert Answer
Answer to C++ recursive. Modify the following code to add the recursive function to repeatedly find the mapped numbers to satisfy …
OR