-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4-honggukang0623 #17
4-honggukang0623 #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ€λλ§μ 리뷰λ¨κΈ°λ€μ~
λ³μ°κΈ° λ¬Έμ μ΄μ€ λ°λ³΅λ¬Έμ νμ©ν μ½λ μλ΄€μ΅λλ€!!
pr μκ³ νμ΄μπ
let line = 1; | ||
while(line <= n){ | ||
|
||
let starStr = ""; | ||
let cnt = 0; | ||
while(cnt < line){ | ||
starStr = starStr+"*" | ||
cnt = cnt + 1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ΄μ€ λ°λ³΅λ¬Έμ μ¬μ©νμ ¨λλ° λ°λ³΅λ¬Έ νλ²μΌλ‘λ 지 μ μμ΄μ μ½λ 첨λΆν΄λ΄ λλ€!!
let starStr = "";
for (let i = 1; i <= n; i++) {
starStr += "*";
console.log(starStr);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cλ‘ λ°λ³΅λ¬Έ μ²μ λ°°μ μ λ νμ΄ λ΄€λ λ¬Έμ μΈλ° μλ°μ€ν¬λ¦½νΈ μ½λλ‘ λ³΄λ μ λ² κΈ°λ€μ...?
#include <stdio.h>
int main() {
int n;
printf("λμ΄λ₯Ό μ
λ ₯νμΈμ: ");
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= i; j++) {
printf("*");
}
printf("\n");
}
return 0;
}
μ΄κ±΄ μ μ μ κ° νμλ μ½λμΈλ° μΈμ΄λ³ 곡ν΅μ μ΄λ μ°¨μ΄μ 보μλ©΄ μ’μ κ² κ°μμ λ¨κ²¨λμ΅λλ€!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ΄ λ¬Έμ λ νμ΄μ¬μ λ°°μ°λ©΄μ μ²μ μ ν΄λ΄€λ λ¬Έμ λ€μ!! μ²μμ *λ‘ μ¬κ°νμ μΆλ ₯νλ λ¬Έμ λ‘ μμνμλλ°, κ·Έλ μ¬μ λλ° μΌκ°νμΌλ‘ νμ©νλ €λ μ΄λ €μ μλ κΈ°μ΅μ΄ μμ΄μ..γ γ μλ°μ€ν¬λ¦½νΈ μ½λλ‘ μ§ κ²μ λ³΄κ³ μ²μμ μ½λκ° μ΄ν΄κ° λμ§ μμ μ΄λ €μ λλ°, μ λ ₯μ λ°λ λΆλΆμ΄ μλ°μ€ν¬λ¦½νΈλ
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
let input = [];
rl.on('line', function (line) {
input = line.split(' ');
}).on('close', function () {
console.log(Number(input[0]));
});
μ΄λ° μμΌλ‘ μ¬μ©λλ€λ κ²μ μκ² λμμ΄μ! μ κ° νμ΄μ¬μΌλ‘
n = int(input())
for i in range(1, n+1):
for j in range(i):
print("*", end="")
print(" ")
μ°Έκ³ νμλ©΄ μ’μ κ² κ°μμ!
PRμμ± μ νμ
¨μ΄μ!
π λ¬Έμ λ§ν¬
https://school.programmers.co.kr/learn/courses/30/lessons/120823
βοΈ μμλ μκ°
20λΆ
β¨ μλ μ½λ
μ 체μ½λ
μΆλ ₯ν λ³μ λ§λ€μ΄ μ€ μ½λλ₯Ό μμ±ν©λλ€.
λ°λ³΅ν λ λ§λ€ λ³μ μΆκ°ν΄μ£Όλ μ½λλ₯Ό μμ±
starStr = starStr+"*"
μ½μ λ‘κ·Έλ₯Ό νμ©ν΄μ μΆλ ₯νλ μ½λλ₯Ό μμ±ν©λλ€.
console.log(starStr)
μ΄μ jsλ₯Ό νμ©ν΄μ κ°λ¨ν μ§κ°μΌκ°ν μΆλ ₯νλ λ¬Έμ μμ΅λλ€.
π μλ‘κ² μκ²λ λ΄μ©