Simple ATM.

Source: Internet
Author: User

# 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.