-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
73 lines (56 loc) · 1.75 KB
/
main.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
#include <stdlib.h>
#include <stdio.h>
#include "accountdetails.h"
#include "interest.h"
#include "balance.h"
int main()
{
int pin,a,n;
char username[100];
printf("Welcome to ABC Banking\n");
printf("1.New User? Open Account\n 2.Existing User Login\n");
scanf("%d",&n);
switch(n){
case 1:
choose();
goto lab;
break;
case 2:
printf("Enter your username\n");
scanf("%s", &username);
printf("Enter your pin\n");
scanf("%d", &pin);
char str[]="Vinay";
if(strcmp(username,str) && pin==12345 ) {
lab: printf("Choose the below User operations to proceed further.\n 1. Interest rate calculation\n 2. Check balance \n 3. Print Mini Statement\n 4. Withdrawl \n 5. Deposit. \n 6. Exit.\n");
scanf("%d",&a);
switch(a)
{
case 1: int_cal();
goto lab;
break;
case 2: chk_balance();
goto lab;
break;
case 3: mini_stat();
goto lab;
break;
case 4: withdrawal();
goto lab;
break;
case 5: deposit();
goto lab;
break;
case 6: exit(0);
break;
default: printf("Invalid");
goto lab;
}
}
else {
printf("Invalid pin or username\n");
}
break;
}
return 0;
}