Objective In this challenge, we learn about switch statements . Check out the attached tutorial for more details. Task Complete the getLetter(s) function in the editor. It has one parameter: a string, , consisting of lowercase English alphabetic letters (i.e., a through z ). It must return A , B , C , or D depending on the following criteria: If the first character in string is in the set , then return A . If the first character in string is in the set , then return B . If the first character in string is in the set , then return C . If the first character in string is in the set , then return D . Hint: You can get the letter at some index in using the syntax s[i] or s.charAt(i) . Input Format Stub code in the editor reads a single string denoting from ...
This blog help you to solve problems on Hackerrank. Basically this blog show solution on c and you may find some other language as well. Enjoy coding!!