Code: the ATM login interface (user verification, selection of the main menu) query-deposit-withdrawal-exit

Source: Internet
Author: User

# Include <stdio. h>
# Include <windows. h>
Int main (void)
{
Int password, one, two, money1 = 1000000, money2 = 999999, a = 0; // The value of money1 is the same as money2.
Printf ("enter your password: \ n ");
Scanf ("% d", & password );
If (Password = 123456 ){
System ("CLS ");
Printf ("data loading... please wait ");
Sleep (1000); // wait for one second
Printf (".");
Sleep (1000 );
Printf (".");
Sleep (1000 );
Printf (".");
Sleep (1000 );
Printf (".");
Sleep (1000 );
Printf (".");
System ("CLS ");
Printf ("select your operation: \ n 1 QUERY \ n 2 withdrawal \ n ");
Scanf ("% d", & one );
If (one = 1 ){
System ("CLS ");
Printf ("1 life coin 2 USD ");
Scanf ("% d", & one );
If (one = 1 ){
System ("CLS ");
Printf ("your current balance is: % d Yuan \ n", money1 );
}
If (one = 2 ){
System ("CLS ");
Printf ("your current balance is: % d USD \ n", money2 );
}
}

Else {
System ("CLS ");
Printf ("1 life coin 2 USD ");
Scanf ("% d", & one );
If (one = 1 ){
System ("CLS ");
Printf ("Enter your amount: RMB \ n ");
Scanf ("% d", & );
System ("CLS ");
Printf ("your balance is: % d Yuan \ n", money1-a );
}
If (one = 2 ){
System ("CLS ");
Printf ("Enter your amount: USD \ n ");
Scanf ("% d", & );
System ("CLS ");
Printf ("your balance is: % d USD \ n", money2-a );
}
}
}
Else {
Printf ("sorry, your password is incorrect !!! \ N ");
}
Getch ();
Return 0;
}

Code: the ATM login interface (user verification, selection of the main menu) query-deposit-withdrawal-exit

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.