forked from crypticani/C_Programs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMOBANKIN.C
61 lines (60 loc) · 1.39 KB
/
MOBANKIN.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include<stdio.h>
#include<conio.h>
main()
{
clrscr();
{
int n,opwd,npwd,rpwd,sam,ram;
long smob,rmob;
printf("Welcome to the world of mobile banking.\nChoose from the options given below :\n1.Balance Enguiry\n2.send money\n3.Request money\n4.Change Password\n0.Exit\n");
scanf("%d",&n);
clrscr();
switch(n){
case 1 :
printf("Your current account balance is Rs.5,657\n");
break;
case 2 :
printf("Enter the mobile number of the reciever to whom you want to send money\n");
scanf("%ld",&smob);
clrscr();
printf("Enter the amount you want to send\n");
scanf("%d",&sam);
clrscr();
printf("Congratulations! Rs. %d has been sent to %ld",sam,smob);
break;
case 3:
printf("Enter the Mobile number of the person from whom you want to request money :\n");
scanf("%ld",&rmob);
clrscr();
printf("Enter the amount:\n");
scanf("%d",&ram);
clrscr();
printf("your request has been successfully initiated.\n");
break;
case 4:
printf("Enter your old pin:\n");
scanf("%d",&opwd);
clrscr();
printf("Enter the new pin:\n");
scanf("%d",&npwd);
clrscr();
printf("Re enter your new pin:\n");
scanf("%d",&rpwd);
clrscr();
if(npwd==rpwd){
printf("Your pin has been successfully changed");
}
else{
printf("sorry!\tpin doesn't match");
}
break;
case 0:
printf("Thank you for banking with us. Your session has expired.");
exit(1);
break;
default:
printf("Invalid input.\n");
}
}
getch();
}