Á¤¼ºÈÆ
    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
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.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();
        }
 
        system("CLS");
    }
    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("****ÀԱݠ±Ý¾×À» ÀÔ·ÂÇϽÿÀ: ");
    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("Ãâ±Ý ±Ý¾×À» ÀÔ·ÂÇϽÿÀ: ");
        scanf("%d"&withdraw);
 
 
        if (withdraw < balance) {
            back = false;
            balance -= withdraw;
            printf("\n»õ·Î¿î Àܰí´Â %dÀÔ´Ï´Ù.\n\n", balance);
        }
 
        else {
        }
    }
    getch();
    printf("¾Æ¹«Å°³ª ´©¸£¼¼¿ä\n");
    return balance;
}
 
void menuExit() {
    printf("´ÙÀ½¿¡ ¶Ç ¸¸³ª¿ä~~~\n");
}
 
void errorMessage() {
    printf("1~4¹ø Áß Çϳª¸¦ ¼±ÅÃÇϼ¼¿ä!!!\n");
    getch();
}
cs

  µî·ÏÀÏ : 2022-04-17 [03:36] Á¶È¸ : 1087 ´Ù¿î : 0   
 
¡â ÀÌÀü±ÛMini Project (ATM ¸¸µé±â)
¡ä ´ÙÀ½±ÛÃß°¡ µµÀü ¹®Á¦ 1
CÇÁ·Î±×·¡¹Ö(ÇÁ·Î±×·¡¹Ö¾ð¾î) ½Ç½À°Ô½ÃÆÇ
¹øÈ£ ¨Ï Á¦ ¸ñ Á¶È¸ µî·ÏÀÏ
Mini Project (¾îµåº¥Ã³ °ÔÀÓ ¸¸µé±â) Ãß°¡ ±¸Çö // ¡Ú¡Ú¡Ú ±â¸»°úÁ¦ °ÔÀÓ±¸Çö ½Ã Âü°í
½Ç½À ¸ñÂ÷
189 (8Àå) ÇÔ¼ö 1250 02-22
188 ¦¦❶ Mini Project (ATM ¸¸µé±â)¨Õ 1505 04-17
187    ¦¦❷ Mini Project (ATM ¸¸µé±â) (¸ð¹ü ´ä¾È) 1087 04-17
186 ¦¦❶ Ãß°¡ µµÀü ¹®Á¦ 1¨Õ 794 05-10
185    ¦¦❷ Ãß°¡ µµÀü ¹®Á¦ 1 (¸ð¹ü ´ä¾È) 523 05-10
184 ¦¦❶ lfactorial.c (±³Àç) 1813 02-22
183 ¦¦❶ lstatic.c (±³Àç) 1565 02-22
182 ¦¦❶ lprime_sum.c (±³Àç) 1666 02-22
181 ¦¦❶ llocal_shadow.c (±³Àç) 1608 02-22
180 ¦¦❶ lglobal_var.c (±³Àç) 1774 02-22
179 ¦¦❶ llocal_var.c (±³Àç) 1675 02-22
178 ¦¦❶ lcheck_prime.c (±³Àç) 1766 02-22
177 ¦¦❶ ltemp.c (±³Àç) 1880 02-22
176 ¦¦❶ lprototype.c (±³Àç) 1665 02-22
175 ¦¦❶ lpower.c (±³Àç) 1654 02-22
174 ¦¦❶ lget_max.c (±³Àç) 1726 02-22
173 ¦¦❶ lfunc1.c (±³Àç) 1669 02-22
172 ¦¦❶ lprint_name2.c (±³Àç) 1795 02-22
171 ¦¦❶ lprint_name1.c (±³Àç) 1837 02-22
170 (7Àå) ¹è¿­ 1500 02-22

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