You have to pass the parameters to scanf as pointers so it can write into the memory represented by the variable, not the memory represented by the variable value.
scanf("%d%d%d",&x,&y,&z);
EDIT:
On a side note, you probably want spaces in between each
%d
so you can enter the 3 numbers as
123 456 789
otherwise you have to separate the numbers by a line break like
123
456
789