# Include <stdio. h>
# Include <string. h>
Void main ()
{
Char A [4] = {0 };
Char E [] = "9527 ";
Int B, C, D, I, J, F = 100;
Printf ("************************************* * ********** \ n ");
Printf ("** \ n ");
Printf ("* Welcome to the terminal ATM * \ n ");
Printf ("* Automatic Card swallowing you are afraid of * \ n ");
Printf ("* producer GLP * \ n ");
Printf ("* If the card is swallowed, please solve it by yourself * \ n ");
Printf ("* our principle is that the dead do not pay off * \ n ");
Printf ("** \ n ");
Printf ("************************************* * ********** \ n ");
For (I = 0; I <3; I ++)
{
Printf ("\ n enter your password :");
Scanf ("% s", );
For (j = 0; j <10; j ++)
{
If (strcmp (a, e) = 0)
{
Printf ("1. Balance query 2. Withdrawal 3. Deposit 4. Password Change 5. Exit \ n ");
Scanf ("% d", & C );
Switch (c)
{
Case 1: printf ("your balance is % d Yuan \ n", F );
Break;
Case 2: printf ("Enter the withdrawal amount \ n ");
Scanf ("% d", & D );
Printf ("Congratulations, you have successfully withdrawn % d. Your balance is % d \ n", D, F-D );
F = f-D;
Break;
Case 3: printf ("put the money! \ N ");
Break;
Case 4: printf ("Enter the new password \ n ");
Scanf ("% d", & E );
Printf ("Congratulations! You changed your password! \ N ");
Break;
Case 5: printf ("Congratulations, you have not swallowed up the card. Welcome to the next time! \ N ");
Return;
}
}
Else
{
Printf ("Incorrect password! Enter ") again ");
Break;
}
}
}
}
Simple ATM.