Smart Keypad -1

I am not understanding what should be the output.

Like I gave the input 123, them possible combinations are -
12 23.

I mean we’ll make combinations like this or is there any other way?

@sharmarachit19962000
string table[] = { " ", ".+@$", "abc", "def", "ghi", "jkl" , "mno", "pqrs" , "tuv", "wxyz" };

for input “12” you have to pick a character from table[1] and one from table[2]
so all the possible combinations will be formed by .+@$ and abc
so all the possible combinations are:

.a
.b
.c
+a
+b
+c
@a
@b
@c
$a
$b
$c

So you have to print all these combinations

I am asking for 123. How to make combinations in situation where more than 2 numbers are involved?

@sharmarachit19962000 for 123 you will make combinatiosn like .ad just pick each element from table[i]

Okay, I understood.
Thanks for taking time.

1 Like

@sharmarachit19962000 dont forget to mark your doubt as resolved!