0
What is the algorithm or main logic for this problem-- I want to find if an alphabet is pressed then it belongs to which row?
In keyboard we have alphabets in three rows-- Row 1- Q to P Row 2- A to L Row 3- Z to M If a key is pressed ,this belong to which row?Only logic and language preferred is C, C++ or JS
4 Antworten
+ 3
your question is not clear enough, please state what you mean by row
+ 3
Pranjal you can use array for this, whereby each character on the same row will be on the same array, and you can use loop to check through and a condition too
0
*AsterisK* see description
0
*AsterisK* No, without comparing character by character.Is there any other ways?