Assignment #4: Decomposition

»ç¿ëÀڷκÎÅÍ ±Ý¾×À» ÀÔ·Â¹Þ¾Æ ´ÙÀ½°ú °°Àº Çü½ÄÀÇ ¼öÇ¥¸¦ Ãâ·ÂÇÏ´Â ÇÁ·Î±×·¥À» ÀÛ¼ºÇ϶ó. (±¹¹Î´ëÇб³¿¡ 1234567¿øÀ» Áö±ÞÇÏ´Â ¼öÇ¥)

----------------------------------------------------------------------
                                                 24-3-98          1001

Áö±ÞÀÚ: ±¹¹Î´ëÇб³                                     \      1,234,567
±Ý  ¾×: ÀϹé ÀÌ½Ê »ï¸¸ »çõ ¿À¹é À°½Ê Ä¥¿ø

                                    __________________________________
----------------------------------------------------------------------

ÇÙ½É ºÎºÐÁß Çϳª´Â ¼öÄ¡·ÎµÈ ±Ý¾×À» ¹®ÀÚ·Î º¯È¯ÇÏ¿© Ãâ·ÂÇÏ´Â ÇÁ·Î±×·¥ÀÌ´Ù. ´ÙÀ½°ú °°Àº functionÀ» ¸¸µé¾î »ç¿ëÇÒ ¼ö ÀÖ´Ù.

void PrintDigit(int d)
{
   if (d == 1) printf("ÀÏ");
   else if (d == 2) printf("ÀÌ");
   else if (d == 3) printf("ȕ");
   else if (d == 4) printf("ȍ");
   else if (d == 5) printf("¿À");
   else if (d == 6) printf("À°");
   else if (d == 7) printf("Ä¥");
   else if (d == 8) printf("ÆÈ");
   else if (d == 9) printf("±¸");
   else printf("%d´Â À߸øµÈ ¼öÀÔ´Ï´Ù.\n", d);
}


»ç¿ë ¿¹)


Enter starting check number: 1001
Enter the date(ÀÏ-¿ù-³â): 24-3-98
Enter the amounts for each check.
Use 0 to exit from the program.

Amount of check (0 to stop): 1234567


----------------------------------------------------------------------
                                                 24-3-98          1001

Áö±ÞÀÚ: ±¹¹Î´ëÇб³                                     \      1,234,567
±Ý  ¾×: ÀϹé ÀÌ½Ê »ï¸¸ »çõ ¿À¹é À°½Ê Ä¥¿ø

                                    __________________________________
----------------------------------------------------------------------

Amount of check (0 to stop): 250000


----------------------------------------------------------------------
                                                 24-3-98          1002

Áö±ÞÀÚ: ±¹¹Î´ëÇб³                                     \        250,000
±Ý  ¾×: ÀÌ½Ê ¿À¸¸ ¿ø

                                    __________________________________
----------------------------------------------------------------------

Amount of check (0 to stop): 2295


----------------------------------------------------------------------
                                                 24-3-98          1003

Áö±ÞÀÚ: ±¹¹Î´ëÇб³                                     \          2,295
±Ý  ¾×: ÀÌõ ÀÌ¹é ±¸½Ê ¿À¿ø

                                    __________________________________
----------------------------------------------------------------------

Amount of check (0 to stop): 0
End of program