Can someone tell me what's problem in the following loop... cuz after 4 values it prints 0 for everything:

#include
#include

int main()
{
int x;
int y;
int z=0;


printf("Enter the number. \n");
scanf(" %d", &x);
printf("Enter the power. \n");
scanf(" %d", &y);

while(z