-
Notifications
You must be signed in to change notification settings - Fork 0
/
tempCodeRunnerFile.c
190 lines (189 loc) · 7.52 KB
/
tempCodeRunnerFile.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# include <stdio.h>
# include <math.h>
int main()
{
int pin,choice,option,agentCode,paybill,accountNumber,account,cardNo;
cardNo=1234;
agentCode=19052;
float balance,amount,Balance;
Balance=balance+amount;
balance=10000.70;
paybill=572572;
pin=1431;
accountNumber=1317774590;
amount=300000.00;
char* hashtag="*522#";
scanf("%c", &hashtag);
printf("Please Send Your instructions\n1. Balance Enquiry\n2. Withdraw cash\n3. Deposit Money\n4. Exit");
scanf("%d", &choice);
switch(choice)
{
case 1:
printf("Balance Enquiry Option-Select Option\n1. KCB Account\n2. KCB Card\n3. Vooma Wallet\n0. Go to Main Menu");
scanf("%d",&option);
switch(option)
{
case 1:
printf("Selected Account-1. /131***4590(KCB Bank Kenya Ltd)\n Enter your pin\n");
scanf("%d", &pin);
if (pin==1431)
{
printf("Your request is being processed. Please wait.\nYour current balance in your account=%.2f Ksh.",balance);
}
else if(pin!=1431)
{
printf("Your request is being proccesses. Please wait.\nInvalid Pin.Please try again later.");
}
break;
case 2:
printf("Select Card Number");
scanf("%d", &cardNo);
if(cardNo==1234)
{
printf("Enter your pin");
scanf("%d", &pin);
if(pin==1431)
{
printf("Your request is being processed. PLease wait.\nYour current balance=%.2f Ksh.",balance);
}
else if(pin!=1431)
{
printf("Your request is being processed. Please wait.\nInvalid Pin. Please try again later.");
}
}
else if(cardNo!=1234)
{
printf("Incorrect Card Number. Please try again later");
}
break;
case 3:
printf("Vooma Wallet Option.\nEnter your pin");
scanf("%d", &pin);
if(pin==1431)
{
printf("Your request is being processed. PLease wait.\nYour current balance=%.2f Ksh.",balance);
}
else if(pin!=1431)
{
printf("Your request is being processed. Please wait.\nInvalid Pin. Please try again later.");
}
break;
case 4:
return 0;
default:
printf("Invalid option \n");
break;
break;
}
case 2:
printf("Withdraw Cash From:\n1. KCB/Vooma Agent\n2. KCB Branch / ATM / Agent by Token\n0.Go to Main Menu");
switch(option)
{
case 1:
printf("Select Source\n1. Vooma Wallet\n2. KCB Account\n0. Go to Main Menu");
switch(option)
case 1:
printf("Enter Vooma Agent Code");
scanf("%d", &agentCode);
if(agentCode==19052)
{
printf("Enter your pin");
scanf("%d", &pin);
if(pin==1431)
{
printf("Your request is being processed. PLease wait.\nYour current balance=%.2f Ksh.",balance);
}
else if(pin!=1431)
{
printf("Your request is being processed. Please wait.\nInvalid Pin. Please try again later.");
}
}
break;
case 2:
printf("Enter pin");
scanf("%d",&pin);
if(pin==1431)
{
printf("Your request is being processed. PLease wait.\nYour current balance=%.2f Ksh.",balance);
}
else if(pin!=1431)
{
printf("Your request is being processed. Please wait.\nInvalid Pin. Please try again later.");
}
break;
case 3:
return 0;
break;
default:
printf("Invalid Input.Try again later\n");
break;
}
break;
case 3:
printf("Select Account\n1. My account\n 2.Other Account");
switch(option)
{
case 1:
printf("Enter Paybill Number\n");
scanf("%d", &paybill);
if(paybill==572572)
{
printf("Enter your Account Number");
scanf("%d", &accountNumber);
}
else if(paybill!=572572)
{
printf("Incorrect paybill");
}
if(accountNumber==1317774590)
{
printf("Enter Pin");
scanf("%d", &pin);
}
else if(accountNumber!=1317774590)
{
printf("Account does not exist.\n");
}
if(pin==1431)
{
printf("Your request is being processed. Please wait...\nConfirmed, you have received ksh.%.2f", amount);
printf("In your account. Your current balance is Ksh.%.2f",balance+amount);
}
else if(pin!=1431)
{
printf("Incorrect pin...Try again later");
}
break;
case 2:
printf("Enter Account Number");
scanf("%d",&account);
printf("Enter Amount");
scanf("%d", &amount);
printf("Enter the pin");
scanf("%d",&pin);
if(pin==1431 && amount<=300000)
{
printf("Your request is being processed. Please wait...\nConfirmed, Ksh.%.2f",amount);
printf("has successfully been deposited in account",account);
}
else if(pin!=1431)
{
printf("Invalid pin...Please try again");
}
else if(amount>300000)
{
printf("Terms and conditions apply...You are limited to deposit above Ksh.300000");
}
break;
default:
printf("Invalid option...Please try again later");
break;
}
break;
case 4:
return 0;
break;
default:
printf("Invalid Option...Please Try Again Later");
}
}