please visit the following link: http://www.techgig.com/codecontest/problem/Rolling-Dices-36
click on participate and please see the code editor on the right side. In the code skeleton there, you can see a function with taking two arguments,both character arrays.
I know a method to solve this problem if both the arrays were integer arrays.
But could anyone please help me with how to convert these char arrays into integer arrays.
the function signature cannot be modified.
If you don't wanna create an account in the site, here's the problem statement:
Two persons are playing a game of rolling 2 dices. Each person roll the two dices n times and record the outcomes( sum of value of two dices) of all the n attempts. So after n attempts of both the player we have two list corresponding to the n outcomes of two players. They want to know that whether they have got all possible outcomes( 2 to 12) same number of times or not. If they got all the possible outcomes same number of times then they are called lucky otherwise unlucky. So the question is that you have two list corresponding to the outcomes of two players you have to decide that whether the two players are lucky or not.
the code has to be written inside the function without changing the signature. I know a method to solve this problem if both the arrays were integer arrays.
But could anyone please help me with how to convert these char arrays into integer arrays.
void rolling_dice(char* input1,char* input2)
{
//Write code here
}
Thanks in advance