Atm C Language
Atm C Language
h>
2: #include<conio.h>
3: int main ()
4: {
5: int p,b=150000,a,ch;
6: printf("Welcome to VIRK International Banking Network\n");
7: printf("\nEnter Your Pin Code : ");
8: while(1)
9: {
10: scanf("%d",&p);
11: if (p==1234)
12: {printf("1 Balance Inquiry" "\t2 Money Transfer" "\n3 Cash Withdrawl" "\t4 10th Anniversary Luc
13: break;}
14: else
15: printf("Invalid Pin \nPlease try again\nPakistan Zindabad");}
16: printf("\nSelect Option:");
17: scanf("%d",&ch);
18: switch (ch)
19: {
20: case 1:
21: printf("Your Present Balance is %d\nPakistan Zindabad",b);
22: break;
23: case 2:
24: printf("This Service is not available at this time\nPakistan Zindabad");
25: break;
26: case 3: {
27: printf("Enter Amount in multiples of 500:\nPakistan Zindabad");
28: while(1){
29: scanf("%d",&a);
30: if(a%500==0 && a<=b)
31: {printf("\n Successful Transaction\nPakistan Zindabad");
32: b=b-a;
33: printf("\nYour Remaining Balance is%d\nPakistan Zindabad",b);
34: break;}
35: else
36: printf("\n\tInvalid Entry\n");}
37: break; }
38: case 4:
39: printf("Better Luck Next Time\nPakistan Zindabad");
40: break;
41: default:
42: printf("Invalid entry\n Pakistan Zindabad");
43: break;}
44: getchar();
45: return 0;
46: }