Hi there.
The program runs and compiles fine, could you state some test variables and their expected outcome please?
From what I gather, z and y must be within the range of -1 to +1 to give the resultant Q, else the message
"Уведіть інші значення" is displayed, which I assume means 'out of range'.