hello, I’m having some issues with this puzzle for some reason its giving me an error saying that the closing bracket for the class declaration is unexpected here’s my code:
* The while loop represents the game.
* Each iteration represents a turn of the game
* where you are given inputs (the heights of the mountains)
* and where you have to print an output (the index of the mountain to fire on)
* The inputs you are given are automatically updated according to your last actions.
static void Main(string args)
var hMax = 0;
var iMax = 0;
// game loop
for (int i = 0; i < 7; i++)
int mountainH = int.Parse(Console.ReadLine()); // represents the height of one mountain, from 9 to 0. Mountain heights are provided from left to right.
if (mountainH > max)
hMax = mountainH;
imax = i;
// Write an action using Console.WriteLine()
// To debug: Console.Error.WriteLine("Debug messages...");
// The index of the mountain to fire on.