update
This commit is contained in:
parent
7c91434745
commit
07f1f26aae
18
.vscode/c_cpp_properties.json
vendored
Normal file
18
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"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
|
||||
}
|
24
.vscode/launch.json
vendored
Normal file
24
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
62
.vscode/settings.json
vendored
62
.vscode/settings.json
vendored
@ -1,7 +1,59 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"iostream": "cpp",
|
||||
"ostream": "cpp",
|
||||
"istream": "cpp"
|
||||
}
|
||||
"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
|
||||
}
|
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
@ -3,7 +3,7 @@
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: g++.exe 生成活动文件",
|
||||
"command": "C:\\TDM-GCC-64\\bin\\g++.exe",
|
||||
"command": "D:\\TDM-GCC\\bin\\g++.exe",
|
||||
"args": [
|
||||
"-fdiagnostics-color=always",
|
||||
"-g",
|
||||
|
@ -11,11 +11,12 @@ void shi_wan();
|
||||
void bai_wan();
|
||||
void qian_wan();
|
||||
void yi();
|
||||
void shi_yi();
|
||||
|
||||
int main(){
|
||||
//选择
|
||||
cout <<"欢迎使用数字拆分加起来器!"<<endl;
|
||||
cout <<"选择: 1.十位 2.百位 3.千位 4.万位 5.十万位 6.百万位 7.千万位 8.亿位 9.退出"<<endl;
|
||||
cout <<"选择: 1.十位 2.百位 3.千位 4.万位 5.十万位 6.百万位 7.千万位 8.亿位 9.十亿位 10.退出"<<endl;
|
||||
cout <<"请输入完成的操作:";
|
||||
int in;
|
||||
cin >>in;
|
||||
@ -44,6 +45,9 @@ int main(){
|
||||
{
|
||||
yi();
|
||||
}else if (in==9)
|
||||
{
|
||||
shi_yi();
|
||||
}else if (in==10)
|
||||
{
|
||||
return 0;
|
||||
}else{
|
||||
@ -249,5 +253,36 @@ void yi(){
|
||||
cout <<"结果为:"<<number;
|
||||
Sleep(1500);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void shi_yi(){
|
||||
//说明
|
||||
cout <<"现在是十亿位计算"<<endl;
|
||||
Sleep(550);
|
||||
cout <<"请输入一个亿位数字(1000000000):";
|
||||
|
||||
//输入
|
||||
int number;
|
||||
cin >>number;
|
||||
|
||||
//计算模块
|
||||
int ge,shi,bai,qian,wan,shi_wan,bai_wan,qian_wan,yi,shi_yi1;
|
||||
ge = number % 10;
|
||||
shi = number / 10 % 10;
|
||||
bai = number / 100 % 10;
|
||||
qian = number /1000 % 10;
|
||||
wan = number / 10000 % 10;
|
||||
shi_wan = number / 100000 % 10;
|
||||
bai_wan = number / 1000000 % 10;
|
||||
qian_wan = number / 10000000 % 10;
|
||||
yi = number / 100000000 % 10;
|
||||
shi_yi1 = number / 1000000000;
|
||||
number = ge + shi + bai + qian + wan + shi_wan + bai_wan + qian_wan + yi;
|
||||
|
||||
//输出结果
|
||||
cout <<"结果为:"<<number;
|
||||
Sleep(1500);
|
||||
|
||||
exit(0);
|
||||
}
|
BIN
homework_laster.exe
Normal file
BIN
homework_laster.exe
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user