I've tested it and it works, don't know where the problem is. I tested line 20 also with
maximum = number;
because at first I thought that the first number was to be considered for the maximum, but after reading the comments I understood it doesn't have to. Thanks