alakshmi1030 / survivor Goto Github PK
View Code? Open in Web Editor NEWYou are in a room with a circle of 100 chairs. The chairs are numbered sequentially from 1 to 100. At some point in time, the person in chair #1 will be asked to leave. The person in chair #2 will be skipped, and the person in chair #3 will be asked to leave. This pattern of skipping one person and asking the next to leave will keep going around the circle until there is one person left… the survivor. Write a program to determine which chair the survivor is sitting in?