parent
73498b9b57
commit
0f10a88a6b
@ -0,0 +1,25 @@ |
||||
#include <stdio.h> |
||||
|
||||
int main() { |
||||
int score = 0; |
||||
|
||||
scanf("%d", &score); |
||||
|
||||
int level = score / 10; |
||||
switch (level) { |
||||
case 10: |
||||
case 9: |
||||
printf("甲等"); |
||||
break; |
||||
case 8: |
||||
printf("乙等"); |
||||
break; |
||||
case 7: |
||||
printf("丙等"); |
||||
break; |
||||
default: |
||||
printf("没有奖金~"); |
||||
break; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,23 @@ |
||||
#include <stdio.h> |
||||
#define PI 3.1415926 |
||||
int main() { |
||||
double x = 0.0, y = 0.0, z = 0.0; |
||||
|
||||
scanf("%lf", &x); |
||||
|
||||
if (x <= 2.5) { |
||||
y = x*x - 1; |
||||
} else { |
||||
y = x*x - 1; |
||||
} |
||||
|
||||
if (x < 0) { |
||||
z = -PI/2.0 + 3.0; |
||||
} else if (x == 0) { |
||||
z = 0; |
||||
} else { |
||||
z = PI/2.0 - 5.0; |
||||
} |
||||
|
||||
printf("y=%lf, z=%lf", y, z); |
||||
} |
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="ProjectModuleManager"> |
||||
<modules> |
||||
<module fileurl="file://$PROJECT_DIR$/.idea/t3.iml" filepath="$PROJECT_DIR$/.idea/t3.iml" /> |
||||
</modules> |
||||
</component> |
||||
</project> |
@ -0,0 +1,6 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="VcsDirectoryMappings"> |
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" /> |
||||
</component> |
||||
</project> |
@ -0,0 +1,6 @@ |
||||
cmake_minimum_required(VERSION 3.21) |
||||
project(t3) |
||||
|
||||
set(CMAKE_CXX_STANDARD 14) |
||||
|
||||
add_executable(t3 main.cpp) |
@ -0,0 +1,6 @@ |
||||
#include <iostream> |
||||
|
||||
int main() { |
||||
std::cout << "Hello, World!" << std::endl; |
||||
return 0; |
||||
} |
@ -0,0 +1,8 @@ |
||||
# Default ignored files |
||||
/shelf/ |
||||
/workspace.xml |
||||
# Editor-based HTTP Client requests |
||||
/httpRequests/ |
||||
# Datasource local storage ignored files |
||||
/dataSources/ |
||||
/dataSources.local.xml |
@ -0,0 +1 @@ |
||||
work20220330 |
@ -0,0 +1,14 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false"> |
||||
<serverData> |
||||
<paths name="remote_linux (563cc454-127a-4c53-a847-5bf281087bb1)"> |
||||
<serverdata> |
||||
<mappings> |
||||
<mapping local="$PROJECT_DIR$" web="/" /> |
||||
</mappings> |
||||
</serverdata> |
||||
</paths> |
||||
</serverData> |
||||
</component> |
||||
</project> |
@ -0,0 +1,4 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" /> |
||||
</project> |
@ -1,6 +1,7 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="VcsDirectoryMappings"> |
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" /> |
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" /> |
||||
</component> |
||||
</project> |
@ -0,0 +1,2 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<module classpath="CMake" type="CPP_MODULE" version="4" /> |
Loading…
Reference in new issue