Compare commits
3 Commits
da036a3a93
...
51edac9f6d
| Author | SHA1 | Date | |
|---|---|---|---|
| 51edac9f6d | |||
| 9341a66cab | |||
| e749379ab0 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
**/*.exe
|
**/*.exe
|
||||||
**/gmon.out
|
**/*.out
|
||||||
12
第一讲 变量、输入输出、表达式与顺序语句/615.cpp
Normal file
12
第一讲 变量、输入输出、表达式与顺序语句/615.cpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include <cstdio>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
float y;
|
||||||
|
scanf("%d%f", &x, &y);
|
||||||
|
printf("%.3f km/l", x / y);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
11
第一讲 变量、输入输出、表达式与顺序语句/616.cpp
Normal file
11
第一讲 变量、输入输出、表达式与顺序语句/616.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include <cstdio>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
double x1, y1, x2, y2;
|
||||||
|
scanf("%lf%lf", &x1, &y1);
|
||||||
|
scanf("%lf%lf", &x2, &y2);
|
||||||
|
printf("%.4lf\n",sqrt(pow((x1-x2),2)+pow((y1-y2),2)));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user