
โ . ์๋ก : ์ซ์(Number) ํ์ ์ด ์ค์ํ ์ด์
๐ 1. Dart์์ ์ซ์(Number) ๋ฐ์ดํฐ ํ์
๐ 2. ์ซ์๋ฅผ ๋ค๋ฃฐ ๋ ๊ณ ๋ คํด์ผ ํ ์ฌํญ
โ ก. ๋ณธ๋ก : ์ซ์ ํ์ ๊ณผ ์ฐ์ฐ์ ํ์ฉ๋ฒ
๐ Step 1: ์ ์(int)์ ์ค์(double) ์ฐจ์ด์
๐ Step 2: ์ฐ์ ์ฐ์ฐ์ (+, -, , /, ~/ ๋ฑ) ํ์ฉ๋ฒ
๐ Step 3: ๋น๊ต ์ฐ์ฐ์ (>, <, ==, != ๋ฑ) ํ์ฉ๋ฒ
๐ Step 4: ์ฆ๊ฐ ์ฐ์ฐ์ (++, --) ๋ฐ ๋ณตํฉ ํ ๋น ์ฐ์ฐ์
๐ Step 5: ์ซ์ ๋ณํ (int ↔ double, String ↔ Number)
๐ Step 6: ์ํ ํจ์ ํ์ฉ (๋ฐ์ฌ๋ฆผ, ์ ๋๊ฐ, ๋์ ์์ฑ ๋ฑ)
โ ข. ์ซ์ ํ์ ์ ํจ๊ณผ์ ์ผ๋ก ํ์ฉํ๋ ๋ฐฉ๋ฒ
๐ ์ซ์ ๊ณ์ฐ ์ ๊ณ ๋ คํ ์
๐ ์ฑ๋ฅ์ ๊ณ ๋ คํ ์ซ์ ์ฐ์ฐ ์ฒ๋ฆฌ ๋ฐฉ๋ฒ
Dart์ ์ซ์(Number) ํ์ ๊ณผ ์ฐ์ฐ์ ํ์ฉ๋ฒ ๐ข๐
Dart์์ ์ซ์(Number) ํ์ ์
์ ์(int)์ ์ค์(double)๋ก ๋๋๋ฉฐ,
์ํ์ ์ฐ์ฐ, ๊ณ์ฐ, ๋น๊ต, ๋ณํ ๋ฑ์
๋ค์ํ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
์ด๋ฒ ํฌ์คํ ์์๋
Dart์ ์ซ์ ํ์ ๊ณผ
์ฃผ์ ์ฐ์ฐ์ ํ์ฉ๋ฒ์
์์ ์ ํจ๊ป ์ ๋ฆฌํ๊ฒ ์ต๋๋ค. ๐
๋จผ์ ,
๋ ๋ง์ ์ ๋ณด, ํน์
์์๋๋ก ํฌ์คํ
์ ๋ณด๊ณ ์ถ๋ค๋ฉด
์๋ ๋
ธ์
์ ํ์ธํด์ฃผ์ธ์.

https://mongmung-i.notion.site/Flutter-1a39b1e2cdaa80319a0fc2a89281dc71?pvs=4
Flutter ์ดํ ๊ฐ๋ฐ ์ผ์ง | Notion
Made with Notion, the all-in-one connected workspace with publishing capabilities.
mongmung-i.notion.site
https://mongmung-i.notion.site/19f9b1e2cdaa80a984ade6141a87fd29?pvs=4
์ฐฝ์ ํธ๋ ์ฌ์ ์บ ํ ๐ฒ | Notion
์ด ๊ณณ์ ์ฐฝ์ ํธ๋ ์ฌ์ ์บ ํ ์งํ ์ฌํญ์ ์ ๋ฆฌํ๋ ๊ณณ์ ๋๋ค.
mongmung-i.notion.site
โ . ์๋ก : ์ซ์(Number) ํ์ ์ด ์ค์ํ ์ด์ ๐ค
Dart์์ ์ซ์(Number) ๋ฐ์ดํฐ ํ์
Dart์์ ์ซ์ ๋ฐ์ดํฐ ํ์ ์
ํฌ๊ฒ ์ ์(int) ์ ์ค์(double) ๋ก ๋๋ฉ๋๋ค.
๊ฐ๊ฐ์ ์ฐจ์ด๋ฅผ ์ดํดํ๊ณ
์ ์ ํ ์ํฉ์์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ค์ํฉ๋๋ค.
void main() {
int age = 30;
double price = 9.99;
print('๋์ด: $age'); // 30
print('๊ฐ๊ฒฉ: $price'); // 9.99
}
โ
์ ์ (int) → ์์์ ์ด ์๋ ์ ์ ๊ฐ์ ์ ์ฅ
โ
์ค์ (double) → ์์์ ์ด ํฌํจ๋ ์ค์ ๊ฐ์ ์ ์ฅ
โก Flutter์์ UI ํฌ๊ธฐ ์กฐ์ , ์ฌ์ฉ์ ์ ๋ ฅ ๋ฐ์ดํฐ, ๊ณ์ฐ ๊ธฐ๋ฅ ๋ฑ์ ๊ตฌํํ ๋ ํ์์ ์ผ๋ก ์ฌ์ฉ! ๐
์ซ์๋ฅผ ๋ค๋ฃฐ ๋ ๊ณ ๋ คํด์ผ ํ ์ฌํญ
โ
์ ์์ ์ค์์ ์ฐจ์ด ์ดํด (int์ double ๋ณํ ํ์ํ ์ ์์)
โ
์ฐ์ฐ์(+, -, *, /, %)๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ ํ์ฉํ์ฌ ๊ณ์ฐ ์ ํ๋ ์ ์ง
โ
์ํ ์ฐ์ฐ ์ dart:math ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฌ์ฉํ์ฌ ์ต์ ํ
โก ์ด์ Dart์์ ์ซ์(Number) ํ์ ๊ณผ ์ฐ์ฐ์ ํ์ฉ๋ฒ์ ํ๋์ฉ ์ดํด๋ณด๊ฒ ์ต๋๋ค! ๐ฏ
โ ก. ๋ณธ๋ก : ์ซ์ ํ์ ๊ณผ ์ฐ์ฐ์ ํ์ฉ๋ฒ ๐๏ธ
Step 1: ์ ์(int)์ ์ค์(double) ์ฐจ์ด์
Dart์์ ์ซ์ ๋ฐ์ดํฐ ํ์ ์ ํฌ๊ฒ
์ ์(int) ์ ์ค์(double) ๋ก ๋๋ฉ๋๋ค.
๊ฐ๊ฐ์ ์ฐจ์ด๋ฅผ ์ดํดํ๊ณ
์ ์ ํ ์ํฉ์์
์ฌ์ฉํ๋ ๊ฒ์ด ์ค์ํฉ๋๋ค.
Dart์์๋
์ ์์ ์ค์๋ฅผ ๋ช ํํ๊ฒ ๊ตฌ๋ถํ๊ธฐ ๋๋ฌธ์,
์ ์๋ฅผ ์ค์๋ก ๋ฐ๊พธ๊ฑฐ๋
์ค์๋ฅผ ์ ์๋ก ๋ณํํ ๋๋
๋ณํ ๋ฉ์๋(toInt(), toDouble()) ๋ฅผ
์ฌ์ฉํด์ผ ํฉ๋๋ค.
์๋ ๋ณํ์ด ๋์ง ์๊ธฐ ๋๋ฌธ์
์ค์ ๊ฐ์ ์ ์ ๋ณ์์ ์ ์ฅํ๋ ค๊ณ ํ๋ฉด
์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
โ ์ ์(int) → ์์์ ์์ด ์ ์ ๊ฐ๋ง ์ ์ฅํ ์ ์์ต๋๋ค.
์๋ฅผ ๋ค์ด, ์ฌ๋์ ๋์ด(30), ํ์์ ํ๋ฒ(20240101), ์ํ ๊ฐ์(50) ๊ฐ์ ๊ฐ์ ์ ์ ํ์ ์ด ์ ํฉํฉ๋๋ค.
โ
์ค์(double) → ์์์ ์ ํฌํจํ ๊ฐ์ ์ ์ฅํ ์ ์์ต๋๋ค.
์๋ฅผ ๋ค์ด, ์ํ ๊ฐ๊ฒฉ(9.99), ์จ๋(36.5), ์์น ์ขํ(127.0043) ๊ฐ์ ๊ฐ์ ์ค์ ํ์ ์ด ํ์ํฉ๋๋ค.
โก ์ ์์ ์ค์๋ ์๋ ๋ณํ๋์ง ์์ผ๋ฏ๋ก, ํ์ํ ๋ toInt() ๋๋ toDouble()์ ์ฌ์ฉํด์ผ ํฉ๋๋ค.
โ ํ์ฉ ์์
void main() {
int age = 30;
double price = 9.99;
print('๋์ด: $age'); // 30
print('๊ฐ๊ฒฉ: $price'); // 9.99
}
โก ์ ์์ ์ค์๋ ์๋ ๋ณํ๋์ง ์์ผ๋ฏ๋ก ๋ณํ ํจ์(toInt(), toDouble()) ์ฌ์ฉ ํ์! ๐ฏ
๐ก ์ค์ ํ์ฉ ์์:
- ์ผํ๋ชฐ ์ฑ์์ ์ํ ๊ฐ์(์ ์) ์ ์ํ ๊ฐ๊ฒฉ(์ค์) ์ ๋ค๋ฃฐ ๋
- ๊ฑด๊ฐ ์ฑ์์ ์ฌ์ฉ์์ ์ฒด์จ(์ค์) ์ ์ธก์ ํ ๋
- ์ง๋ ์ฑ์์ ์๋ ๋ฐ ๊ฒฝ๋(์ค์) ๋ฅผ ์ฒ๋ฆฌํ ๋
Step 2: ์ฐ์ ์ฐ์ฐ์ (+, -, , /, ~/ ๋ฑ) ํ์ฉ๋ฒ
Dart์์๋
์ฌ์น์ฐ์ฐ(+, -, *, /)๋ฟ๋ง ์๋๋ผ
์ ์ ๋๋์ (~/)๊ณผ
๋๋จธ์ง(%) ์ฐ์ฐ์๋ ์ ๊ณตํฉ๋๋ค.
- ๋ง์ (+) / ๋บ์ (-) / ๊ณฑ์ (*) ์ ์ผ๋ฐ์ ์ธ ๊ณ์ฐ์ ์ํํ ๋ ์ฌ์ฉ๋ฉ๋๋ค.
- ๋๋์ (/) ์ ํญ์ ์ค์(double) ๊ฐ์ ๋ฐํํ๋ฏ๋ก ์ ์ ๋๋์ ์ด ํ์ํ ๊ฒฝ์ฐ ๋ชซ ์ฐ์ฐ์(~/) ๋ฅผ ์ฌ์ฉํด์ผ ํฉ๋๋ค.
- ๋ชซ ์ฐ์ฐ์(~/) ๋ ๋๋์ ํ ์์์ ์ ๋ฒ๋ฆฌ๊ณ ์ ์ ๋ถ๋ถ๋ง ๋ฐํํฉ๋๋ค.
- ๋๋จธ์ง ์ฐ์ฐ์(%) ๋ ๋๋์ ํ ๋จ์ ๋๋จธ์ง๋ฅผ ๋ฐํํ๋ ์ฐ์ฐ์๋ก, ๋ฐ๋ณต ์ฃผ๊ธฐ ๊ณ์ฐ ์ ์์ฃผ ์ฌ์ฉ๋ฉ๋๋ค.
โ ๊ธฐ๋ณธ์ ์ธ ์ฌ์น์ฐ์ฐ ์ฐ์ฐ์
void main() {
int a = 10;
int b = 3;
print('๋ง์
: ${a + b}'); // 13
print('๋บ์
: ${a - b}'); // 7
print('๊ณฑ์
: ${a * b}'); // 30
print('๋๋์
: ${a / b}'); // 3.333...
}
โ ๋ชซ ์ฐ์ฐ์ (~/)์ ๋๋จธ์ง ์ฐ์ฐ์ (%)
void main() {
int a = 10;
int b = 3;
print('๋ชซ: ${a ~/ b}'); // 3 (์ ์ ๋๋์
)
print('๋๋จธ์ง: ${a % b}'); // 1
}
โก ๋๋์ ๊ฒฐ๊ณผ๋ฅผ ์ ์๋ก ์ป๊ณ ์ถ๋ค๋ฉด ~/ ์ฐ์ฐ์๋ฅผ ์ฌ์ฉํ๋ฉด ๋ฉ๋๋ค.
๐ก ํ์ฉ ์์:
- ์ด ๊ฐ๊ฒฉ์ ๊ณ์ฐํ ๋ → price * quantity
- ํ๊ท ์ ์๋ฅผ ๊ณ์ฐํ ๋ → total / count (์์์ ํฌํจ ํ์)
- ํ์ด์ง๋ค์ด์ (ํ์ด์ง ์ฒ๋ฆฌ) ๊ตฌํํ ๋ → currentPage ~/ itemsPerPage (๋ชซ ์ฐ์ฐ ํ์)
- ํน์ ์ฃผ๊ธฐ๋ง๋ค ๋ฐ๋ณต๋๋ ์ด๋ฒคํธ ์คํํ ๋ → day % 7 == 0 (๋๋จธ์ง ์ฐ์ฐ ํ์)
Step 3: ๋น๊ต ์ฐ์ฐ์ (>, <, ==, != ๋ฑ) ํ์ฉ๋ฒ
๋น๊ต ์ฐ์ฐ์๋
๋ ๊ฐ์ ์ซ์๋ฅผ ๋น๊ตํ๊ณ
์ฐธ/๊ฑฐ์ง (Boolean) ๊ฐ์ ๋ฐํํฉ๋๋ค.
์กฐ๊ฑด๋ฌธ๊ณผ ํจ๊ป ํ์ฉํ๋ฉด
ํน์ ๋ก์ง์ ์คํํ ๋ ์ ์ฉํฉ๋๋ค.
- > (ํฌ๋ค) → ์ผ์ชฝ ๊ฐ์ด ์ค๋ฅธ์ชฝ ๊ฐ๋ณด๋ค ํฌ๋ฉด true ๋ฐํ
- < (์๋ค) → ์ผ์ชฝ ๊ฐ์ด ์ค๋ฅธ์ชฝ ๊ฐ๋ณด๋ค ์์ผ๋ฉด true ๋ฐํ
- >= (ํฌ๊ฑฐ๋ ๊ฐ๋ค) → ์ผ์ชฝ ๊ฐ์ด ์ค๋ฅธ์ชฝ ๊ฐ๋ณด๋ค ํฌ๊ฑฐ๋ ๊ฐ์ผ๋ฉด true ๋ฐํ
- <= (์๊ฑฐ๋ ๊ฐ๋ค) → ์ผ์ชฝ ๊ฐ์ด ์ค๋ฅธ์ชฝ ๊ฐ๋ณด๋ค ์๊ฑฐ๋ ๊ฐ์ผ๋ฉด true ๋ฐํ
- == (๊ฐ๋ค) → ๋ ๊ฐ์ด ๊ฐ์ผ๋ฉด true ๋ฐํ
- != (๋ค๋ฅด๋ค) → ๋ ๊ฐ์ด ๋ค๋ฅด๋ฉด true ๋ฐํ
โ ์ซ์ ๋น๊ต ์ฐ์ฐ์
void main() {
int x = 10;
int y = 5;
print(x > y); // true
print(x < y); // false
print(x >= y); // true
print(x <= y); // false
print(x == y); // false
print(x != y); // true
}
๐ก ํ์ฉ ์์:
- ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ ๊ฐ์ด ํน์ ๋ฒ์ ๋ด์ ์๋์ง ํ์ธ → if (age >= 18) {...}
- ์ซ์๊ฐ ๊ฐ์์ง ๋น๊ตํ์ฌ ์คํ ๋ก์ง ๋ณ๊ฒฝ → if (score == 100) {...}
- ์ต์ ๋๋ ์ต๋๊ฐ ์กฐ๊ฑด ์ค์ → if (temperature > 30) { print("๋๋ฌด ๋์"); }
Step 4: ์ฆ๊ฐ ์ฐ์ฐ์ (++, --) ๋ฐ ๋ณตํฉ ํ ๋น ์ฐ์ฐ์
Dart์์๋
๋ณ์ ๊ฐ์ ์ฆ๊ฐ ๋๋ ๊ฐ์ ์ํฌ ๋
++ ๋๋ -- ์ฐ์ฐ์๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
์ด ์ฐ์ฐ์๋ ๋ณดํต ๋ฐ๋ณต๋ฌธ์์
์นด์ดํธ ์ฆ๊ฐ/๊ฐ์ ๋ฅผ ์ฒ๋ฆฌํ ๋ ๋ง์ด ์ฌ์ฉ๋ฉ๋๋ค.
- ++ → 1 ์ฆ๊ฐ
- -- → 1 ๊ฐ์
๋ณตํฉ ํ ๋น ์ฐ์ฐ์๋
๊ธฐ์กด ๋ณ์์ ๊ฐ์ ํน์ ์ฐ์ฐ์ ์ ์ฉํ ํ
๊ฒฐ๊ณผ๋ฅผ ๋ค์ ๋ณ์์ ์ ์ฅํ๋ ์ญํ ์ ํฉ๋๋ค.
- += → a += b; ๋ a = a + b; ์ ๋์ผ
- -= → a -= b; ๋ a = a - b; ์ ๋์ผ
- *= → a *= b; ๋ a = a * b; ์ ๋์ผ
- /= → a /= b; ๋ a = a / b; ์ ๋์ผ
โ ์ฆ๊ฐ ์ฐ์ฐ์ (++, --)
void main() {
int num = 10;
num++; // 11
print(num);
num--; // 10
print(num);
}
โ ๋ณตํฉ ํ ๋น ์ฐ์ฐ์ (+=, -=, *=, /=)
void main() {
int value = 5;
value += 3; // value = value + 3
print(value); // 8
value *= 2; // value = value * 2
print(value); // 16
}
๐ก ํ์ฉ ์์:
- ์นด์ดํธ ์ฆ๊ฐ/๊ฐ์ ๋ฒํผ ๋ง๋ค๊ธฐ → likeCount++, cartItems--
- ๊ฒ์ ์ ์ ์ ๋ฐ์ดํธ → score += 10;
- ํ ์ธ์จ ๊ณ์ฐ → price *= 0.9; // 10% ํ ์ธ
Step 5: ์ซ์ ๋ณํ (int ↔ double, String ↔ Number)
์ซ์ ๋ฐ์ดํฐ๋ ๋ค๋ฅธ ํ์ ์ผ๋ก
๋ณํํด์ผ ํ๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ต๋๋ค.
์๋ฅผ ๋ค์ด,
์ฌ์ฉ์๊ฐ ์ ๋ ฅํ ์ซ์๋
๋ฌธ์์ด(String) ํ์ ์ด๋ฏ๋ก
์ ์(int) ๋๋ ์ค์(double)๋ก
๋ณํํด์ผ ํฉ๋๋ค.
- ์ ์๋ฅผ ์ค์๋ก ๋ณํํ ๋ toDouble() ์ฌ์ฉ
- ์ค์๋ฅผ ์ ์๋ก ๋ณํํ ๋ toInt() ์ฌ์ฉ (์์์ ์ดํ ๊ฐ์ ๋ฒ๋ ค์ง)
- ๋ฌธ์์ด์ ์ซ์๋ก ๋ณํํ ๋ int.parse() ๋๋ double.parse() ์ฌ์ฉ
- ์ซ์๋ฅผ ๋ฌธ์์ด๋ก ๋ณํํ ๋ toString() ์ฌ์ฉ
"void main() {"๋ ํ์ ์ธ ๊ฑฐ ์์์ฃ ?

โ ์ ์๋ฅผ ์ค์๋ก ๋ณํ (toDouble())
int number = 10;
double converted = number.toDouble();
print(converted); // 10.0
โ ์ค์๋ฅผ ์ ์๋ก ๋ณํ (toInt())
double value = 10.99;
int rounded = value.toInt();
print(rounded); // 10
โ ๋ฌธ์์ด์ ์ซ์๋ก ๋ณํ (int.parse(), double.parse())
String numText = '42';
int num = int.parse(numText);
print(num + 10); // 52
โ ์ซ์๋ฅผ ๋ฌธ์์ด๋ก ๋ณํ (toString())
double pi = 3.14;
String piText = pi.toString();
print('PI ๊ฐ: ' + piText);
๐ก ํ์ฉ ์์:
- ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ ์ซ์๋ฅผ ์ ์๋ก ๋ณํํ์ฌ ๊ณ์ฐ → int.parse(userInput)
- ์์์ ์ด ํ์ํ์ง ์์ ๊ฐ์ ์ ์๋ก ๋ณํํ์ฌ ์ ์ฅ → toInt()
- ์ซ์๋ฅผ UI์ ํ์ํ ๋ ๋ฌธ์์ด๋ก ๋ณํ → toString()
Step 6: ์ํ ํจ์ ํ์ฉ (๋ฐ์ฌ๋ฆผ, ์ ๋๊ฐ, ๋์ ์์ฑ ๋ฑ)
Dart์์๋
dart:math ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฌ์ฉํ์ฌ
๋ค์ํ ์ํ ์ฐ์ฐ์ ์ํํ ์ ์์ต๋๋ค.
- round() → ์์์ ์ดํ ๊ฐ์ ๋ฐ์ฌ๋ฆผ
- ceil() → ์์์ ์ดํ ๊ฐ์ ์ฌ๋ฆผ
- floor() → ์์์ ์ดํ ๊ฐ์ ๋ด๋ฆผ
- abs() → ์ ๋๊ฐ ๋ฐํ
- max(a, b), min(a, b) → ๋ ์ซ์ ์ค ์ต๋/์ต์๊ฐ ๋ฐํ
- Random().nextInt(n) → 0๋ถํฐ n-1 ์ฌ์ด์ ๋๋ค ์ซ์ ๋ฐํ
โ ๋ฐ์ฌ๋ฆผ (round(), ceil(), floor())
double num = 3.75;
print(num.round()); // 4
print(num.ceil()); // 4 (์ฌ๋ฆผ)
print(num.floor()); // 3 (๋ด๋ฆผ)
โ ์ ๋๊ฐ (abs())
int negative = -10;
print(negative.abs()); // 10
โ ์ต๋/์ต์๊ฐ (max(), min())
import 'dart:math';
void main() {
print(max(10, 20)); // 20
print(min(10, 20)); // 10
}
โ ๋๋ค ์ซ์ ์์ฑ (Random())
import 'dart:math';
void main() {
var random = Random();
print(random.nextInt(100)); // 0~99 ์ฌ์ด์ ๋๋ค ์ซ์
}
๐ก ํ์ฉ ์์:
- ๋๋คํ ์ซ์ ์์ฑํ์ฌ ๋ก๋ ๋ฒํธ ๋ฝ๊ธฐ → Random().nextInt(45) + 1
- ์ ๋๊ฐ์ ํ์ฉํ์ฌ ๊ฑฐ๋ฆฌ ์ฐจ์ด ๊ณ์ฐ → (pointA - pointB).abs()
- ์ต๋๊ฐ/์ต์๊ฐ์ ๊ตฌํด ํน์ ์กฐ๊ฑด ์ค์ → max(score1, score2)
โ ข. ์ซ์ ํ์ ์ ํจ๊ณผ์ ์ผ๋ก ํ์ฉํ๋ ๋ฐฉ๋ฒ โ
์ซ์ ๊ณ์ฐ ์ ๊ณ ๋ คํ ์
โ
์ ์์ ์ค์๋ฅผ ์ ์ ํ ๋ณํํ์ฌ ์ฌ์ฉ
โ
์ ํํ ๊ณ์ฐ์ ์ํด round(), ceil(), floor() ํ์ฉ
โ
Flutter UI์์ ์ซ์๋ฅผ ๋ค๋ฃฐ ๋ ์ ์ ํ ํฌ๋งทํ
์ ์ฉ
โก Dart์ ์ซ์ ํ์ ๊ณผ ์ฐ์ฐ์๋ฅผ ์ตํ๋ฉด, ๋ค์ํ ๊ณ์ฐ ๊ธฐ๋ฅ์ ์ฝ๊ฒ ๊ตฌํ ๊ฐ๋ฅ! ๐
์ซ์(Number) ํ์ ๊ณผ ์ฐ์ฐ์ ์ ๋ฆฌ
โ
์ ์(int)์ ์ค์(double)๋ ๊ฐ๊ฐ์ ํน์ง์ด ์์
โ
์ฌ์น์ฐ์ฐ, ๋น๊ต ์ฐ์ฐ, ์ฆ๊ฐ ์ฐ์ฐ, ์ซ์ ๋ณํ ๋ฑ์ ์์ ๋กญ๊ฒ ํ์ฉ ๊ฐ๋ฅ
โ
์ํ ์ฐ์ฐ ์ dart:math ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ ๊ทน ํ์ฉ