820 C Language Jobs

Source: Internet
Author: User

#include <stdio.h>voidMain () {inti,j; intCode=0, flag=0; intchoice1=0, choice2=0, choice3=0; intrmb=100000, wb=100000; intcash1=0, cash2=0; Charinstruct='N'; printf ("************************************************************\n"); printf ("* *\n"); printf ("* Welcome to the Blue Shit ATM cash machine *\n"); printf ("* *\n"); printf ("* Version number:1.0.1 *\n"); printf ("* *\n"); printf ("************************************************************\n"); printf ("Please type your password: \ n");  for(i=0;i<3; i++) {scanf ("%d",&code); System ("CLS"); if(code==9527)        {             Break; }        if(code!=9527) {printf ("Wrong password! Please enter again: \ n"); Flag+=1; }     }     if(flag==3) {printf ("your password input error 3 times, please go to blue shit consulting! "); return; }                       while(instruct=='N'|| instruct=='N' )    {                  if(code==9527) {printf ("Welcome back, Mr. Xu! \ n"); printf ("1. Check the balance 2. Withdrawal 3. Exit"); scanf ("%d",&Choice1); System ("CLS"); Switch(Choice1) { Case 1:p rintf ("1. RMB 2. Foreign currency"); scanf ("%d",&Choice2); System ("CLS"); Switch(choice2) { Case 1:p rintf ("your RMB account balance: ¥%d\n", RMB);  Break;  Case 2:p rintf ("your foreign currency account balance: $%d\n", WB);  Break; }                        Break;  Case 2:p rintf ("1. RMB 2. Foreign currency"); scanf ("%d",&choice3); System ("CLS"); Switch(choice3) { Case 1:p rintf ("Please enter the withdrawal amount: \ n"); scanf ("%d",&cash1); RMB=rmb-Cash1; printf ("your account balance: ¥%d\n", RMB);  Break;  Case 2:p rintf ("Please enter the withdrawal amount: \ n"); scanf ("%d",&CASH2); WB=wb-Cash2; printf ("your account balance: $%d\n", WB);  Break; }                            Break;  Case 3:                         Break; } printf ("whether to exit the program <y indicates yes, n means no;:"); scanf ("%s",&instruct); }                  }}

820 C Language Jobs

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.