Here are two suggestions,
1. For loops are designed for counters like this. This isn't your problem, but it will make things clearer.
2. Put the cout in the inner-most while loop as I am assuming that you want do display the result after every calculation (not just on the last calculation of z every time.
int main()
{
int x, y, z;
for (x = 1; x<=5; x++)
{
for (z = 2; z<=6; z++)
{
if (x == z) continue; // No div/0!
y = (x*z) / (x-z);
cout<<"\t" <<x <<"\t "<<z <<"\t "<<y<<endl;
}
}
}
Note my addition in line 8. In the case where x==z, you are dividing by zero. That's not allowed!!!! The continue keyword tells us to skip the rest of this loop and proceed with the next value of z.