0% found this document useful (0 votes)
40 views

Atm C Language

This code is a C program for a banking application that allows users to check their balance, withdraw cash, and access other banking services after entering their pin code. It prompts the user to enter their pin, then displays a menu for balance inquiry, money transfer, cash withdrawal, or a 10th anniversary promotion. Based on the user's selection, it will either display their balance, indicate a service is unavailable, or prompt for a withdrawal amount that is a multiple of 500 and less than their balance before updating the remaining amount.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Atm C Language

This code is a C program for a banking application that allows users to check their balance, withdraw cash, and access other banking services after entering their pin code. It prompts the user to enter their pin, then displays a menu for balance inquiry, money transfer, cash withdrawal, or a 10th anniversary promotion. Based on the user's selection, it will either display their balance, indicate a service is unavailable, or prompt for a withdrawal amount that is a multiple of 500 and less than their balance before updating the remaining amount.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1: #include<stdio.

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: }

You might also like