This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| for (int day = 1; day < 4; day++) { //dayκ° 1μμ 3μΌλ‘ λ³ν λκΉμ§, μ¦ 3ν λ°λ³΅ν λκΉμ§ | |
| print('$day goes by'); //ν΄λΉ 문ꡬλ₯Ό μΆλ ₯νλ€. | |
| } | |
| print('----------------------------'); //κ²½κ³μ μ μΆλ ₯νλ€. | |
| List teacherList = ["κ°κ²½ν μ μλ", "κΉμ€μ€ μ μλ"]; //κ°κ²½ν μ μλκ³Ό κΉμ€μ€ μ μλμ | |
| //teacherListλΌλ μ΄λ¦μ κ°μ§ | |
| //리μ€νΈλΌλ ν΅μ λ£λλ€. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String a = ''; //λ¬Έμμ΄μ λ£μ μ μλ λ³μ μ μΈ | |
| int b = 0; //μ μλ₯Ό λ£μ μ μλ λ³μ μ μΈ | |
| double c = 0.0; //μμ«μ μ΄ μλ μ€μλ₯Ό λ£μ μ μλ λ³μ μ μΈ | |
| bool d = true; //μ°Έκ³Ό κ±°μ§ κ°μ λ£μ μ μλ λ³μ μ μΈ | |
| void main() { | |
| a = 'λ¬Έμμ΄'; //λ³μμ ν΄λΉ κ° λμ | |
| b = 7; //λ³μμ ν΄λΉ κ° λμ | |
| c = 1.1; //λ³μμ ν΄λΉ κ° λμ | |
| d = false; //λ³μμ ν΄λΉ κ° λμ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bool judge = false; //λΆλ¦¬μΈν judge λ³μμ κ±°μ§ κ° λμ | |
| void main() { | |
| A(); //Aν¨μ νΈμΆ | |
| if (judge) { //judgeλ³μμ μ°Έ κ°μ΄ λ€μ΄μλ€λ©΄ | |
| B(); //Bν¨μ νΈμΆ | |
| C(); //Cν¨μ νΈμΆ | |
| } else { //judgeλ³μμ κ±°μ§ κ°μ΄ λ€μ΄μλ€λ©΄ | |
| C(); //Cν¨μ νΈμΆ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| A(); //Aν¨μ νΈμΆ | |
| B(); //Bν¨μ νΈμΆ | |
| C(); //Cν¨μ νΈμΆ | |
| } | |
| void A() { | |
| print('A'); //A μΆλ ₯ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //μμ μ¬μκ³ λ±νκ΅ μ€ν 리ν λ§ μν | |
| //μν μ λͺ©: Circle of Life | |
| String male = ''; //λ¨μ μ£ΌμΈκ³΅ μ΄λ¦ λ³μ(λ¬Έμμ΄μ λ΄λ λ³μ) | |
| String female = ''; //μ¬μ μ£ΌμΈκ³΅ μ΄λ¦ λ³μ(λ¬Έμμ΄μ λ΄λ λ³μ) | |
| int stone = 0; //μ λΉν λμ κ°―μ(μ μλ₯Ό λ΄λ λ³μ) | |
| double money = 0.0; //λ(μμ«μ μ΄ μλ μ€μλ₯Ό λ΄λ λ³μ) | |
| bool isSick = false; //건κ°(μ°Έκ³Ό κ±°μ§μ λ΄λ λ³μ) | |
| void main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| μμ μ¬μκ³ λ±νκ΅ μ€ν 리ν λ§ μν | |
| μν μ λͺ©: Circle of Life | |
| */ | |
| String male = ''; //λ¨μ μ£ΌμΈκ³΅ μ΄λ¦ λ³μ | |
| String female = ''; //μ¬μ μ£ΌμΈκ³΅ μ΄λ¦ λ³μ | |
| int stone = 0; //μ λΉν λμ κ°―μ | |
| double money = 0.0; //λ | |
| bool isSick = false; //κ±΄κ° |