I wrote this piece of code, but cases 2 and 3 seem to have a problem. As noted in the title I think it has to do with unsigned long operations, but I can't understand what it is exactly.
*Edited version (scanf changes).
int pin, inp, count=0;
unsigned dep=100, add, withdraw;
printf("Please, input your PIN number:");
printf("To view your deposit, press 1.\n");
printf("To add money to your deposit, press 2.\n");
printf("To withdraw money from your deposit, press 3.\n");
printf("To log off, press 4.\n");
printf("The remainder of your deposit is %i.\n\n", dep);
printf("Enter the amount of money you want to add: ");
printf("Enter the amount of money you want to withdraw. We would like to remind you that it should be multiple of 20.\n");
printf("We are sorry, but you either chose an invalid withdraw amount or you tried to withdrw more money than you have deposited.\n");
printf("You entered an invalid PIN.");
You're not using scanf correctly.
"%lu" it expects a pointer to an unsigned long int, but what you're passing is not a pointer and not an unsigned long int.
Or change add's type.
I'd also recommend checking scanf's returned value.
See: Value returned by scanf function in c