์ž๋ฐ”๋ณ„์ฐ๊ธฐ

ยท Java
์—ฌ๋Ÿฌ ๊ทธ๋ฆผ์„ ๋ณด์•„๋„ ์ด๋ ‡๋‹คํ•  ๊ทœ์น™์„ ์ฐพ๊ธฐ ์–ด๋ ค์› ๋‹ค. ๊ทธ๋ž˜์„œ ๊ทธ๋ƒฅ ์›์˜ ๋ฐฉ์ •์‹์„ ์‚ฌ์šฉํ•ด์„œ ๋‚ด๋ถ€์— ์žˆ๋Š” ์ ๋“ค๋งŒ *๋กœ ๋‚˜์˜ฌ ์ˆ˜ ์žˆ๋„๋ก ํ–ˆ๋‹ค 1. ์ž…๋ ฅ๊ฐ’ = ๋ฐ˜์ง€๋ฆ„ ์ž…๋ ฅ๊ฐ’์€ ์ •์ˆ˜๋กœ ๋ฐ›๋Š”๋‹ค ์ž…๋ ฅ๊ฐ’์ด ์ปค์งˆ์ˆ˜๋ก ๋ฐ˜์ง€๋ฆ„์ด ์ปค์ ธ ์›์˜ ๋ฒ”์œ„๊ฐ€ ๋„“์–ด์ง€๋Š” ํ˜•ํƒœ 2. ์ผ๋‹จ ์‚ฌ๊ฐํ˜•์„ ์ž‘์„ฑํ•˜์˜€๋‹ค. for (int i = -r; i
ยท Java
ํ’€์ด๋ฐฉ๋ฒ• 1. ๋ณ€๊ณก์  ๊ธฐ์ค€์œผ๋กœ ๋„ํ˜•์„ ์ž๋ฅธ๋‹ค 2. ์œ„ ์‚ผ๊ฐํ˜•์˜ ๋„ˆ๋น„๊ธธ์ด๋ฅผ ๊ธฐ์ค€์œผ๋กœ, ์•„๋ž˜ ์‚ผ๊ฐํ˜•์˜ ๋„ˆ๋น„๊ธธ์ด๋ฅผ ๊ตฌํ•œ๋‹ค. 3. ์ฃผ์˜ ! - ๋‘๋ฒˆ์งธ ๋ฐ˜๋ณต๋ฌธ์‹์—์„œ๋Š” i์™€ ๊ด€๋ จ์žˆ๋Š” ์‹์„ ์“ธ๊ฒƒ, ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด(๋งŒ์•ฝ number ๊ธฐ์ค€) ์‚ฌ๊ฐํ˜•์ด ๋งŒ๋“ค์–ด์ง import java.util.Scanner; public class ๋งˆ๋ฆ„๋ชจ { public static void main(String[] args) { int number = scan.nextInt();// ์Šค์บ”๊ฐ’์ด 1์ผ๋•Œ ๊ทธ๋ƒฅ *์ด ๋‚˜์˜ค๋Š” ๊ฒƒ์„ ํ”ผํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด +1์„ ํ•ด๋„ ์ข‹๋‹ค int number = scan.nextInt(); int maxWidth = 2 * number -1; //1. ์œ„ ์‚ผ๊ฐํ˜• for (int i = 0; i < number; i++) { f..
becky(์ง€์€)
'์ž๋ฐ”๋ณ„์ฐ๊ธฐ' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก