/BalloonGame

Primary LanguageJavaMIT LicenseMIT

Balloon Game with Java

In a situation where there are N balloons arranged in a circle with N and K values to be entered on the keyboard, K-1 balloons are skipped and the balloon in the Kth position is popped. The process continues in this way until only one balloon remains. The last remaining balloon is not popped. In other words, given any value of N and K, we want to find the position of the balloon that will not be popped.

Examples of program run results: For N=4 and K=2, the balloon in the first position remains unpopped. For N=5 and K=3, the balloon in the fourth position remains unpopped.

NOTE: To run the program, you just need to download the zip file from Releases and run the exe file in Console.