InterviewSolution
Saved Bookmarks
| 1. |
Write a function for a list of person names and their age. Note there is no particular order and pattern and names are in mixed format - ie. both upper and lower case mixed up. eg. YasIR - 19, Mangal SarVesh - 22, SmuttLES Zack - 42, Vicky Bhagat - 61, etc. Write a function groupPersons() which will work on this list and makes the names to Title case ie. only the first letter is capitalized and group them into 4 groups based on age - Group1 : Less than 20; Group2 : 20 - 30; Group 3 : 30 - 50; Group 4 : Above 50. Do not use print or output statements. eg. printf, print, cout, System.out.println, etc. |
| Answer» PLS SEND an ATTACHMENT FILE with it so that OTHERS can knowExplanation: | |