(½Ç½À3) ¹®ÀÚÆ®¸®
³»¿ë: ÷ºÎÆÄÀÏ¿¡ ÀÖ´Â ±×¸²°ú °°ÀÌ * ¹®ÀÚ¸¦ Ãâ·ÂÇÏ´Â ÇÁ·Î±×·¥À» ÀÛ¼ºÇϽÿÀ.
1) 2Â÷¿ø ¹®Àڹ迿¡ * ¹®ÀÚ¸¦ ³Ö¾î Ãâ·ÂÇÏ´Â ¹æ½ÄÀ¸·Î ±¸ÇöÇϽÿÀ.
2) ¹è¿À» »ç¿ëÇÏÁö ¸»°í for loop¸¦ »ç¿ëÇÏ¿© Ãâ·ÂÇÏ´Â ¹æ½ÄÀ¸·Î ±¸ÇöÇϽÿÀ.
(°¡·Î 11, ¼¼·Î 11 ·Î ±¸Çö)
Ãß°¡: À§ÀÇ °ÍÀ» ¸ðµÎ ÇÑ ÇлýÀº ¼¼·Î·Î ½ÎÀÎ °î¼±À» ±×¸®´Â ÇÁ·Î±×·¥À» ÀÛ¼ºÇϽÿÀ.
(sin() ÇÔ¼ö¸¦ »ç¿ëÇØ¾ß ÇÔ)
(sin() ÇÔ¼ö¸¦ »ç¿ëÇÏ·Á¸é #include <math.h> ¸¦ »ç¿ëÇØ¾ß ÇÔ)
°í±Þ: Çà·Ä Àüü¸¦ ÀúÀåÇÏ´Â ¹æ½ÄÀ¸·Î ¼±¾ðµÈ µÎ °³ÀÇ 3x3 Çà·ÄÀ» °öÇÏ´Â ÇÁ·Î±×·¥À» ÀÛ¼ºÇϽÿÀ.
(3Áß for loop·Î ±¸ÇöÇϽÿÀ.)
[µ¿ÀÛÅ×½ºÆ®]
1 2 3 1 1 1 6 6 6
4 5 6 x 1 1 1 = 15 15 15
7 8 9 1 1 1 24 24 24
[±³Àç ÇÁ·Î±×·¥ Âü°í]
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-1.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-2.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-3.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-4.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-5.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-6.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-7.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-8.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-9.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-10.c
- http://itsys.hansung.ac.kr/lec/dstruct/htmls/source/chap3/prog3-11.c