diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 89bd7bf..0000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "configurations": [ - { - "name": "windows-gcc-x64", - "includePath": [ - "${workspaceFolder}/**" - ], - "compilerPath": "D:/TDM-GCC/bin/gcc.exe", - "cStandard": "${default}", - "cppStandard": "${default}", - "intelliSenseMode": "windows-gcc-x64", - "compilerArgs": [ - "" - ] - } - ], - "version": 4 -} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 93dc78b..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "C/C++ Runner: Debug Session", - "type": "cppdbg", - "request": "launch", - "args": [], - "stopAtEntry": false, - "externalConsole": true, - "cwd": "c:/Users/Admin/gitee/code", - "program": "c:/Users/Admin/gitee/code/build/Debug/outDebug", - "MIMode": "gdb", - "miDebuggerPath": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index bb879da..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "C_Cpp_Runner.cCompilerPath": "gcc", - "C_Cpp_Runner.cppCompilerPath": "g++", - "C_Cpp_Runner.debuggerPath": "gdb", - "C_Cpp_Runner.cStandard": "", - "C_Cpp_Runner.cppStandard": "", - "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", - "C_Cpp_Runner.useMsvc": false, - "C_Cpp_Runner.warnings": [ - "-Wall", - "-Wextra", - "-Wpedantic", - "-Wshadow", - "-Wformat=2", - "-Wcast-align", - "-Wconversion", - "-Wsign-conversion", - "-Wnull-dereference" - ], - "C_Cpp_Runner.msvcWarnings": [ - "/W4", - "/permissive-", - "/w14242", - "/w14287", - "/w14296", - "/w14311", - "/w14826", - "/w44062", - "/w44242", - "/w14905", - "/w14906", - "/w14263", - "/w44265", - "/w14928" - ], - "C_Cpp_Runner.enableWarnings": true, - "C_Cpp_Runner.warningsAsError": false, - "C_Cpp_Runner.compilerArgs": [], - "C_Cpp_Runner.linkerArgs": [], - "C_Cpp_Runner.includePaths": [], - "C_Cpp_Runner.includeSearch": [ - "*", - "**/*" - ], - "C_Cpp_Runner.excludeSearch": [ - "**/build", - "**/build/**", - "**/.*", - "**/.*/**", - "**/.vscode", - "**/.vscode/**" - ], - "C_Cpp_Runner.useAddressSanitizer": false, - "C_Cpp_Runner.useUndefinedSanitizer": false, - "C_Cpp_Runner.useLeakSanitizer": false, - "C_Cpp_Runner.showCompilationTime": false, - "C_Cpp_Runner.useLinkTimeOptimization": false, - "C_Cpp_Runner.msvcSecureNoWarnings": false -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 2161d88..116616f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,7 +3,7 @@ { "type": "cppbuild", "label": "C/C++: g++.exe 生成活动文件", - "command": "D:\\TDM-GCC\\bin\\g++.exe", + "command": "C:\\TDM-GCC-64\\bin\\g++.exe", "args": [ "-fdiagnostics-color=always", "-g", diff --git a/dist/homework_laster.exe b/dist/homework_laster.exe index aa7f66f..7fa7c45 100644 Binary files a/dist/homework_laster.exe and b/dist/homework_laster.exe differ diff --git a/homework_laster.cpp b/homework_laster.cpp index a7a219f..ade6429 100644 --- a/homework_laster.cpp +++ b/homework_laster.cpp @@ -7,11 +7,12 @@ void shi_d(); void bai1(); //定义函数 void qian(); void wan(); +void shi_wan(); int main(){ //选择 cout <<"欢迎使用数字组合器!"<>in; @@ -28,6 +29,9 @@ int main(){ { wan(); }else if (in==5) + { + shi_wan(); + }else if (in==6) { exit(0); } @@ -117,4 +121,27 @@ void wan(){ cout <<"结果为:"<>number; + + //计算模块 + int ge,shi,bai,qian,wan,shi_wan1; + ge = number % 10; + shi = number / 10 % 10; + bai = number /100 % 10; + qian = number / 1000 % 10; + wan = number / 10000 % 10; + shi_wan1 = number / 100000; + number = ge + shi + bai + qian + wan + shi_wan1; + + //输出结果 + cout <<"结果为:"<