--- id: cpp-output-numbers title: "C++ Output Numbers" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["cout math expressions", "C++ 숫자 좜λ ₯"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.82 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["cpp", "programming-language", "w3schools", "output", "numbers"] raw_sources: ["https://www.w3schools.com/cpp/cpp_output_numbers.asp"] applied_in: [] github_commit: "" --- # [[CPP Output Numbers]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) `cout <<` accepts a raw MATHEMATICAL EXPRESSION directly (`cout << 3 + 3;`), not just a pre-computed variable or literal β€” meaning `<<`'s right-hand side is evaluated as a genuine expression before printing, unlike a naive assumption that only simple values can follow the insertion operator. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **No quotes for numbers** β€” unlike text, numeric values are NOT wrapped in double quotes when printed with `cout`. [S1] - **Inline expression evaluation** β€” `cout << 3 + 3;` computes the sum THEN prints the result (6), not the literal text "3 + 3". [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Printing a bare number: `cout << 3;`. [S1] - Printing the result of addition: `cout << 3 + 3; // 6`. [S1] - Printing the result of multiplication: `cout << 2 * 5; // 10`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) - ν˜„μž¬κΉŒμ§€ 발견된 λͺ¨μˆœ 사항 μ—†μŒ (No contradictions found in available sources). ## πŸ› οΈ 적용 사둀 (Applied in summary) ν˜„μž¬ 발견된 μ‹€μ œ 적용 사둀가 μ—†μŠ΅λ‹ˆλ‹€ β€” cout에 μˆ˜μ‹μ„ 직접 λ„£μ–΄ 계산 κ²°κ³Όλ₯Ό 좜λ ₯ν•˜λŠ” νŒ¨ν„΄μ΄ 이후 μ‚°μˆ  μ—°μ‚°μž(Operators Arithmetic) μ±•ν„°μ˜ κΈ°μ΄ˆκ°€ λœλ‹€. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Printing the result of an inline arithmetic expression (C++): ```cpp cout << 3 + 3; // Outputs 6, not "3 + 3" ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.82 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[C++ Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CPP Output]], [[CPP New Lines]] - **μ°Έμ‘° λ§₯락:** 숫자 좜λ ₯ β€” μ€„λ°”κΏˆ(New Lines) μ±•ν„°λ‘œ 이어짐. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” C++ Output Numbers β€” https://www.w3schools.com/cpp/cpp_output_numbers.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "C++ Output Numbers" page (Astra wiki-curation, P-Reinforce v3.1 format).