Your input will be an English sentence, phrase, or word. It will only contain
a-zA-Z' -,.!?. Your task is to take the input, remove spaces, and then redistribute capitalization such that letters at indexes that were capitalized before (and only letters at indexes that were capitalized before) are capitalized.
For example, if the input is
A Quick Brown Fox Jumped Over The Lazy Dog, the (0-based) indexes of the capital letters are
0, 2, 8, 14, 18, 25, 30, 34, 39. Next, remove spaces from the input:
AQuickBrownFoxJumpedOverTheLazyDog. Next, lowercase all letters, but uppercase those at
0, 2, 8, 14, 18, 25, 30, 34, 39:
AqUickbrOwnfoxJumpEdovertHelazYdog, which is your output.
Your input will be an English sentence, phrase, or word. It can only contain lowercase letters, uppercase letters, hyphens, apostrophes, commas, periods, question marks, exclamation marks, and spaces.
The input with spaces removed, lowercase-d, with letters at the index of capital letters in the input uppercase-d.
NOTE: Your program cannot crash (error such execution terminates) with an IndexOutOfRange or similar error.
Hi! Test! Hi!tEst! A Quick Brown Fox Jumped Over The Lazy Dog AqUickbrOwnfoxJumpEdovertHelazYdog testing TESTing TeStING testing testing TESTING testingtESTIngteStInGTEstingtestingtestiNG TESTING... ... ... success! EUREKA???!!! maybe, don't, NOOOOO TESTING.........success!eureKA???!!!maybe,don't,nooooo Enter PASSWORD --------- Enterpassword--------- A a B b C c D d E e F f G g H h I i J j K k L l M m N n O o P p Q q R r S s T t U u V v W w X x Z z AabbCcddEeffGghhIijjKkllMmnnOoppQqrrSsttUuvvWwxxZz TEST teST