help for the program for water tank

void display(int z) // function declared Display(int z

That's not a function prototype.

This is: void display(int z); // function declared Display(int z