介绍
在本实验中,我们将学习如何在 C++ 中计算用户输入的 n 个数字的平均值,而不使用数组。我们将逐行分析代码,并理解其工作原理。
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
cpp(("C++")) -.-> cpp/IOandFileHandlingGroup(["I/O and File Handling"])
cpp(("C++")) -.-> cpp/StandardLibraryGroup(["Standard Library"])
cpp(("C++")) -.-> cpp/SyntaxandStyleGroup(["Syntax and Style"])
cpp(("C++")) -.-> cpp/BasicsGroup(["Basics"])
cpp(("C++")) -.-> cpp/ControlFlowGroup(["Control Flow"])
cpp/BasicsGroup -.-> cpp/variables("Variables")
cpp/BasicsGroup -.-> cpp/operators("Operators")
cpp/ControlFlowGroup -.-> cpp/for_loop("For Loop")
cpp/IOandFileHandlingGroup -.-> cpp/output("Output")
cpp/IOandFileHandlingGroup -.-> cpp/user_input("User Input")
cpp/StandardLibraryGroup -.-> cpp/math("Math")
cpp/SyntaxandStyleGroup -.-> cpp/code_formatting("Code Formatting")
subgraph Lab Skills
cpp/variables -.-> lab-96156{{"计算用户输入的 N 个数字的平均值"}}
cpp/operators -.-> lab-96156{{"计算用户输入的 N 个数字的平均值"}}
cpp/for_loop -.-> lab-96156{{"计算用户输入的 N 个数字的平均值"}}
cpp/output -.-> lab-96156{{"计算用户输入的 N 个数字的平均值"}}
cpp/user_input -.-> lab-96156{{"计算用户输入的 N 个数字的平均值"}}
cpp/math -.-> lab-96156{{"计算用户输入的 N 个数字的平均值"}}
cpp/code_formatting -.-> lab-96156{{"计算用户输入的 N 个数字的平均值"}}
end