0

I was asked to make a Security program, but not all results were achieved

Suppose you are working in a casino and there is a thief trying to steal money and you have to write a program to see if there is a guard G between thief T and money D or $. If there is a guard, print quiet, and if there is no guard between the money and the thief, set off the alarm and print ALARM. You can view the full program with the required in the solutions section. https://code.sololearn.com/cs5aH4GUf9ji/?ref=app

19th Oct 2021, 8:52 PM
Be-smile
Be-smile - avatar
2 ответов
+ 1
You need one or more! guards between the thief and the monay. Before and behind T,G or $ could stand also guards. And a little hint. You can remove all x. Here are some situations that could happen. GG$GGTGG GGT$GG TGG$ and of course T and $ vice versa
19th Oct 2021, 11:13 PM
Stefanoo
Stefanoo - avatar
0
Thank you I figured it out.. I should delete all x . But I think I should change the whole code...it's tedious
24th Oct 2021, 11:06 PM
Be-smile
Be-smile - avatar