Kaykay8018 Kaykay8018
  • 29-04-2022
  • Computers and Technology
contestada

write a recurseive string-returned function replace that accepts a string and returns a new string consisting of the original string with each blank replace with an asterisk

Respuesta :

YulTheNinja YulTheNinja
  • 12-05-2022

Answer:

Write a recursive, string -valued method, replace, that accepts a string and returns a new string consisting of the original string with each blank replaced with an asterisk (*)

Explanation:

Replacing the blanks in a string involves: Nothing if the string is empty Otherwise: If the first character is not a blank, simply concatenate it with the result of replacing the rest of the string If the first character IS a blank, concatenate an * with the result of replacing the rest of the string

Answer Link

Otras preguntas

Go verbs are regular verbs that talk about motion.
A motor bike gets 60 kilometer per gallon of gasoline.how many gallons of gasoline would the bike need to travel 240 kilometers?
The slowest type of mass movement, Which involves the lifting and contracting of soil particles overtime, is called
What do you think was the most important accomplishment of the progressive era? Support your answer with examples showing how the accomplishment affects the liv
Why is evidence important to a strong argument??
What is the circumference of a circle with a radius of 56 ?
the distance d a train travels directly with he amount of time t that has elapsed since departure.if the train travels 475 i 9.5 hours how any miles did the tra
what is the sum of 52.38 divided by 16
What is groundwater erosion?
Why isn't a largest predator just at the top of a food web?