-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBalance.h
104 lines (84 loc) · 2.74 KB
/
Balance.h
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
#include <stdio.h>
#include <stdlib.h>
char acc_type[2][10];
extern float savingsMinBalance;
extern float currentMinBalance;
void chk_balance()
{
int a;
printf("Choose the type of Account\n 1.SavingsAccount\n 2.CurrentAccount\n");
scanf("%d",&a);
switch(a){
case 1:
printf("Your Savings Account Balance %.2f \n",savingsMinBalance);
break;
case 2:
printf("Your Current Account Balance %.2f \n",currentMinBalance);
break;
}
}
float with_amount;
void withdrawal()
{
int a;
printf("Choose the type of Account\n 1.SavingsAccount\n 2.CurrentAccount\n");
scanf("%d",&a);
switch(a){
case 1:
printf("Enter the Witdraw Amount\n");
scanf("%f",&with_amount);
if(with_amount>savingsMinBalance)
{
printf("Insufficient Balance!!!\n");
}
else
{
printf("Your withdrawal is successfully completed. Your new balance is %.2f \n",savingsMinBalance-with_amount);
}
break;
case 2:
printf("Withdrawl facility is not possible for current account");
break;
}
}
float deposit_amount;
void deposit()
{
int a;
printf("Choose the type of Account\n 1.SavingsAccount\n 2.CurrentAccount\n");
scanf("%d",&a);
switch(a){
case 1:
printf("Enter the Deposit Amount");
scanf("%f",&deposit_amount);
printf("Your deposit is successful and your new Savings Account balance is %.2f \n",savingsMinBalance+deposit_amount);
break;
case 2:
printf("Enter the Deposit Amount");
scanf("%f",&deposit_amount);
printf("Your deposit is successful and your new Savings Account balance is %.2f \n",currentMinBalance+deposit_amount);
break;
}
}
void mini_stat()
{
printf("Ministatement:\n");
time_t t = time(NULL);
printf("Current Date & Time %s\n", ctime(&t));
printf("Date / Remarks Amount\n");
printf("_______________________________________\n");
printf(" 06 Feb 2019 5000.00\n");
printf(" To Transfer \n");
printf("_______________________________________\n");
printf(" 09 April 2019 1000.00\n");
printf(" To Debit SMS charge\n");
printf("_______________________________________\n");
printf(" 18 July 2019 6000.00\n");
printf(" To Credit Interest \n");
printf("_______________________________________\n");
printf(" 26 August 2019 8000.00\n");
printf(" By Debit card \n");
printf("_______________________________________\n");
printf(" 09 December 2019 4000.00\n");
printf(" By Debit card \n");
}