Á¤¼ºÈÆ
    bending.c (±³Àç)
  http://itsys.hansung.ac.kr/cgi-bin/onlineTest/viewCcoding/onlineCcoding.cgi?source=src/chap04/bending.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
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
 
int main(void)
{
    int money, price, change;
 
    printf("ÅõÀÔÇÑ µ·: ");
    scanf("%d"&money);
 
    printf("¹°°Ç°ª: ");
    scanf("%d"&price);
 
    change = money - price;
    printf("°Å½º¸§µ·:  %d\n\n", change);
 
    int coin100s = change / 100;    // °Å½º¸§µ·¿¡¼­ 100¿ø Â¥¸®ÀÇ °³¼ö °è»ê
    change = change % 100;      // °Å½º¸§µ·¿¡¼­ 100¿ø Â¥¸®¸¦ ³»ÁÖ°í ³²Àº µ·
 
    int coin10s = change / 10;      // °Å½º¸§µ·¿¡¼­ 10¿ø Â¥¸®ÀÇ °³¼ö °è»ê
    change = change % 10;       // °Å½º¸§µ·¿¡¼­ 10¿ø Â¥¸®¸¦ ³»ÁÖ°í ³²Àº µ·
 
    printf("100¿ø µ¿ÀüÀÇ °³¼ö: %d\n", coin100s);
    printf("10¿ø µ¿ÀüÀÇ °³¼ö: %d\n", coin10s);
 
    return 0;
}
cs

  µî·ÏÀÏ : 2022-02-21 [23:23] Á¶È¸ : 1924 ´Ù¿î : 0   
 
¡â ÀÌÀü±Ûcomp_op.c (±³Àç)
¡ä ´ÙÀ½±Ûdays.c (±³Àç)
ÇÁ·Î±×·¡¹Ö¾ð¾î ½Ç½À°Ô½ÃÆÇ
¹øÈ£ ¨Ï Á¦ ¸ñ Á¶È¸ µî·ÏÀÏ
lMini Project (¾îµåº¥Ã³ °ÔÀÓ ¸¸µé±â) Ãß°¡ ±¸Çö // ¡Ú¡Ú¡Ú ±â¸»°úÁ¦ °ÔÀÓ±¸Çö ½Ã Âü°í
l½Ç½À ¸ñÂ÷
61 ¦¦❶ lbit_shift.c (±³Àç) 2033 02-21
60    ¦¦❷ bit_shift.c (Ãß°¡) 2062 03-17
59 ¦¦❶ lbit_op.c (±³Àç) 1979 02-21
58    ¦¦❷ bit_op.c (Çлý Ç®ÀÌ) ÄÄÇ»ÅÍ¿¡¼­ À½¼ö Ç¥Çö 816 03-20
57       ¦¦❸ ¨Õbit_op.c (Çлý Ç®ÀÌ) ÄÄÇ»ÅÍ¿¡¼­ À½¼ö Ç¥Çö (¸ð¹ü ´ä¾È) 1466 03-20
56 ¦¦❶ lrelational.c (±³Àç) 1755 02-21
55 ¦¦❶ lcomp_op.c (±³Àç) 2076 02-21
54 ¦¦❶ lbending.c (±³Àç) 1924 02-21
53 ¦¦❶ ldays.c (±³Àç) 1840 02-21
52 ¦¦❶ lincdec.c (±³Àç) 1770 02-21
51 ¦¦❶ lmodulo.c (±³Àç) 1793 02-21
50    ¦¦❷ modulo.c (Çлý Ç®ÀÌ) ½Ã/ºÐ/ÃÊ·Î º¯È¯ 847 03-17
49       ¦¦❸ modulo.c (Ãß°¡) (¸ð¹ü ´ä¾È) 1364 03-17
48 ¦¦❶ larithmetic2.c (±³Àç) 1564 02-21
47 ¦¦❶ larithmetic1.c (±³Àç) 1709 02-21
46 (3Àå) º¯¼ö¿Í ÀÚ·áÇü 1010 02-21
45 ¦¦❶ Mini Project (ÀÚ·áÇü »ç¿ë) 688 03-01
44    ¦¦❷ Mini Project (ÀÚ·áÇü »ç¿ë) (¸ð¹ü ´ä¾È) 642 03-01
43 ¦¦❶ µµÀü ¹®Á¦ 1) 1781 03-16
42    ¦¦❷ µµÀü ¹®Á¦ 1) (¸ð¹ü ´ä¾È) 1371 03-16

[1] [Prev]-[11][12][13][14][15]