one sugestion I would have is that for simple program like that is to not us scanf. scanf can be tricky sometimes and if you just starting off you better off trying something else. if you want something real easy try using this getline function below to read in a line.
Code:
int getline(char line[], int max) // line is the variable to read into, max is max number of char to read
int nch = 0;
int c;
max = max - 1;
while((c = getchar()) != EOF)
{
if(c == '\n')
break;
if(nch < max)
{
line[nch] = c;
nch = nch + 1;
}
}
if(c == EOF && nch == 0)
return EOF;
line[nch] = '\0';
return nch;
}
then if you need it to be an int just use atoi
also I think you want that else to be an else if(number_of_deposits >= 50)
and for your while at the bottom won't take when the number entered is greater than 0 so you should change it to
while(number_of_deposits >= 50 || number_of_deposits <= 0)