Init
This commit is contained in:
commit
9b502ee90c
1
.clang-format
Normal file
1
.clang-format
Normal file
@ -0,0 +1 @@
|
||||
IndentWidth: 4
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.exe
|
21
.vscode/c_cpp_properties.json
vendored
Normal file
21
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"C:/mingw-w64/include",
|
||||
"C:/mingw-w64/x86_64-w64-mingw32/include"
|
||||
],
|
||||
"defines": [],
|
||||
"compilerPath": "gcc",
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17",
|
||||
"browse": {
|
||||
"limitSymbolsToIncludedHeaders": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
7
.vscode/settings.json
vendored
Normal file
7
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"files.associations": {
|
||||
".env": "env",
|
||||
"ostream": "cpp",
|
||||
"iosfwd": "cpp"
|
||||
}
|
||||
}
|
28
.vscode/tasks.json
vendored
Normal file
28
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: gcc 生成活动文件",
|
||||
"command": "gcc",
|
||||
"args": [
|
||||
"-fdiagnostics-color=always",
|
||||
"-g",
|
||||
"${file}",
|
||||
"-o",
|
||||
"${fileDirname}/${fileBasenameNoExtension}.exe"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "调试器生成的任务。"
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
9
0225/1.c
Normal file
9
0225/1.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
#define PI 3.14159265358979323846
|
||||
|
||||
int main() {
|
||||
double r;
|
||||
scanf("%lf", &r);
|
||||
printf("%f\n%f", 4 * PI * r * r, PI * r * r * r * 4 / 3);
|
||||
return 0;
|
||||
}
|
9
0225/2.c
Normal file
9
0225/2.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#define square(x) ((x) * (x))
|
||||
|
||||
int main() {
|
||||
int x1, y1, x2, y2;
|
||||
scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
|
||||
printf("%f", sqrt(square(x2 - x1) + square(y2 - y1)));
|
||||
}
|
8
0225/3.c
Normal file
8
0225/3.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int num;
|
||||
scanf("%d", &num);
|
||||
printf("%d %d %d\n", num / 100, num / 10 % 10, num % 10);
|
||||
return 0;
|
||||
}
|
11
0225/4.c
Normal file
11
0225/4.c
Normal file
@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
char a, b;
|
||||
scanf("%c %c", &a, &b);
|
||||
char c = a;
|
||||
a = b;
|
||||
b = c;
|
||||
printf("%c %c", a, b);
|
||||
return 0;
|
||||
}
|
6
0225/5.c
Normal file
6
0225/5.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
int main(){
|
||||
char c;
|
||||
scanf("%c", &c);
|
||||
printf("%c %c\n%d %d %d", c, c + 1, c - 1, c, c + 1);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user