Á¤¼ºÈÆ
    Mini Project (ATM ¸¸µé±â) ¸ð¹ü ´ä¾È



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
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
 
void mainMenu();
void checkBalance(int balance);
int moneyDeposit(int balance);
int moneyWithdraw(int balance);
void menuExit();
void errorMessage();
 
int main() {
    int option = 0;
    int balance = 10000;
    int choose = 0;
 
    bool again = true;
 
    while (again) {
        mainMenu();
 
        scanf("%d"&option);
 
        switch (option) {
        case 1:
            checkBalance(balance);
            break;
        case 2:
            balance = moneyDeposit(balance);
            break;
        case 3:
            balance = moneyWithdraw(balance);
            break;
 
        case 4:
            menuExit();
            return 0;
 
        default:
            errorMessage();
            break;
        }
 
        system("CLS");
        if (choose == 2) {
            again = false;
            menuExit();
 
        }
 
    }
    return 0;
}
 
void mainMenu() {
    printf("**********Welcome to Äܼ­Æ® ATM***********\n");
    printf("****Çϳª¸¦ ¼±ÅÃÇϽÿÀ****\n");
    printf("<1>  Àܰí È®ÀÎ\n");
    printf("<2>  ÀÔ±Ý\n");
    printf("<3>  ÀÎÃâ\n");
    printf("<4>  Á¾·á\n");
 
}
 
void checkBalance(int balance) {
    printf("****Àܰí´Â %dÀÔ´Ï´Ù.\n\n", balance);
    printf("¾Æ¹«Å°³ª ´©¸£¼¼¿ä\n");
    getch();
 
}
 
int moneyDeposit(int balance) {
    int deposit;
    printf("****ÀԱݠ±Ý¾×À» ÀÔ·ÂÇϽÿÀ\n");
    scanf("%d"&deposit);
 
    balance += deposit;
    printf("\n»õ·Î¿î Àܰí´Â %dÀÔ´Ï´Ù.\n\n", balance);
    printf("¾Æ¹«Å°³ª ´©¸£¼¼¿ä\n");
    getch();
    return balance;
 
}
 
int moneyWithdraw(int balance) {
    int withdraw;
    bool back = true;
 
    while (back) {
        printf("Ãâ±Ý ±Ý¾×À» ÀÔ·ÂÇϽÿÀ: \n");
        scanf("%d"&withdraw);
 
 
        if (withdraw < balance) {
            back = false;
            balance -= withdraw;
            printf("\n»õ·Î¿î Àܰí´Â %dÀÔ´Ï´Ù.\n\n", balance);
        }
 
        else {
        }
    }
    getch();
    printf("¾Æ¹«Å°³ª ´©¸£¼¼¿ä\n");
    return balance;
}
 
void menuExit() {
}
 
void errorMessage() {
}
cs

  µî·ÏÀÏ : 2022-04-17 [03:36] Á¶È¸ : 376 ´Ù¿î : 0   
 
¡â ÀÌÀü±ÛMini Project (ATM ¸¸µé±â)
¡ä ´ÙÀ½±Ûfactorial.c (±³Àç)
ÇÁ·Î±×·¡¹Ö¾ð¾î ½Ç½À°Ô½ÃÆÇ
¹øÈ£ ¨Ï Á¦ ¸ñ Á¶È¸ µî·ÏÀÏ
½Ç½À ¸ñÂ÷
178    ¦¦❷ Mini Project (¾îµåº¥Ã³ °ÔÀÓ ¸¸µé±â) ¸ð¹ü ´ä¾È 225 04-24
177       ¦¦❸ Mini Project (¾îµåº¥Ã³ °ÔÀÓ ¸¸µé±â) Ãß°¡ ±¸Çö ºñ°ø°³ 67 05-26
176 ¦¦❶ lp_func.c (±³Àç) 517 02-22
175 ¦¦❶ lp_array2.c (±³Àç) 486 02-22
174 ¦¦❶ lp_array1.c (±³Àç) 427 02-22
173 ¦¦❶ lswap2.c (±³Àç) 518 02-22
172 ¦¦❶ lswap1.c (±³Àç) 474 02-22
171 ¦¦❶ lcall_by_ref.c (±³Àç) 399 02-22
170 ¦¦❶ lcall_by_value.c (±³Àç) 441 02-22
169 ¦¦❶ lpointer_arith1.c (±³Àç) 460 02-22
168 ¦¦❶ lpointer2.c (±³Àç) 474 02-22
167 ¦¦❶ lpointer1.c (±³Àç) 457 02-22
166 ¦¦❶ laddress_of.c (±³Àç) 496 02-22
165 (8Àå) ÇÔ¼ö 391 02-22
164 ¦¦❶ Mini Project (ATM ¸¸µé±â) 540 04-17
163    ¦¦❷ Mini Project (ATM ¸¸µé±â) ¸ð¹ü ´ä¾È 376 04-17
162 ¦¦❶ lfactorial.c (±³Àç) 602 02-22
161 ¦¦❶ lstatic.c (±³Àç) 521 02-22
160 ¦¦❶ lprime_sum.c (±³Àç) 573 02-22
159 ¦¦❶ llocal_shadow.c (±³Àç) 552 02-22

[1][2][3][4][5][6][7][8][9][10]-[Next][13]