介绍
在本实验中,我们将学习如何使用 C++ 编程语言判断用户输入的数字是正数还是负数。我们将通过使用 if-else
语句块的概念来实现这一目标。
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
cpp(("`C++`")) -.-> cpp/BasicsGroup(["`Basics`"])
cpp(("`C++`")) -.-> cpp/ControlFlowGroup(["`Control Flow`"])
cpp(("`C++`")) -.-> cpp/IOandFileHandlingGroup(["`I/O and File Handling`"])
cpp(("`C++`")) -.-> cpp/SyntaxandStyleGroup(["`Syntax and Style`"])
cpp/BasicsGroup -.-> cpp/variables("`Variables`")
cpp/BasicsGroup -.-> cpp/data_types("`Data Types`")
cpp/ControlFlowGroup -.-> cpp/conditions("`Conditions`")
cpp/ControlFlowGroup -.-> cpp/if_else("`If...Else`")
cpp/IOandFileHandlingGroup -.-> cpp/output("`Output`")
cpp/IOandFileHandlingGroup -.-> cpp/user_input("`User Input`")
cpp/IOandFileHandlingGroup -.-> cpp/files("`Files`")
cpp/SyntaxandStyleGroup -.-> cpp/code_formatting("`Code Formatting`")
subgraph Lab Skills
cpp/variables -.-> lab-96123{{"`判断数字是正数还是负数`"}}
cpp/data_types -.-> lab-96123{{"`判断数字是正数还是负数`"}}
cpp/conditions -.-> lab-96123{{"`判断数字是正数还是负数`"}}
cpp/if_else -.-> lab-96123{{"`判断数字是正数还是负数`"}}
cpp/output -.-> lab-96123{{"`判断数字是正数还是负数`"}}
cpp/user_input -.-> lab-96123{{"`判断数字是正数还是负数`"}}
cpp/files -.-> lab-96123{{"`判断数字是正数还是负数`"}}
cpp/code_formatting -.-> lab-96123{{"`判断数字是正数还是负数`"}}
end