Hi, have the below mention design, anyone know how to write the program or can direct me to any help? Any help will be greatly appreciated, thanks. Take for example an input string "This is *swaped* here no change" will produce an output string " This is *depaws* here no change".

initialise variables to be used
read in string to be tested
loop while end of the string is reached
if swap is off then
copy characters from input string to output string
if end
if asterisk is found then
determine the start and stop position of swap
set swap on
if end
if swap is on then
execute the swap
set swap off if swap completed
if end
loopend
write out the input string
write out the output string