Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in c++ Write a function int mm_score(string k, string g, int &b, int &w) where k is the secret key g is the guess b
in c++
Write a function
int mm_score(string k, string g, int &b, int &w)
where k is the secret key g is the guess b is the number of black points (to be set by your function) w is the number of white points (to be set by your function) and returns 1 if the lengths k,g>0 and equal, otherwise returns 0 and b,w are ignored
File you must submit: soln_func.cc
Examples:
k=111 g=111 b=3 w=0
k=abcd g=dcba b=0 w=4
k=abcde g=edcba b=1 w=4
k=xxxyy g=xyzbx b=1 w=2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started