First you have to figure the logic of your program.
I guess this is the first assignment in a school project, so not too complicated yet.
First you have two input limitations: the entered bet must be more than 1 and less than available funds.
Hard coded values is always a bad idea, so start with declaring a constant for the lower limit:
For example
#define MIN_BET 1
If you look at function bett(int x), your logic there is not correct.
You call the function with the variable money, but you have initialized money to zero.
You need to assign an initial value to money first and this should also be a constant.
#define INITIAL_MONEY 1000
then assign
money = INITIAL_MONEY;
bet = bett(money);
or
bet = bett(INITIAL_MONEY);
Also learn from the beginning to use reasonable names for your variables. Naming them x, y and z is a recipe for confusion.
x could be called initialMoney
y could be called riskedMoney
As this is C, you need to define a prototype for your functions before the main() function. Or put the main function last.
int GetBetFromPlayer(int initialMoney);
int main()
{
}
In the while loop, you only have one condition, and you need two right.
You need to check that the riskedMoney is within both the upper and lower limits.
so
while(y>x)
should be
while ((riskedMoney < MIN_BET) && (riskedMoney > initialMoney))
You might make a note of which statement you think is more readable.
Don't be afraid of using long names and spaces to make your code more easy to read.
There, I think this will keep you occupied for a while.