Skip to content

Commit 1fa6ee2

Browse files
Add files via upload
1 parent 3b37750 commit 1fa6ee2

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

b01/bai18.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <iostream>
2+
#include <cmath>
3+
using namespace std;
4+
int main()
5+
{
6+
double x1, y1, x2, y2;
7+
cin >> x1 >> y1 >> x2 >> y2;
8+
cout << sqrt( (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) );
9+
return 0;
10+
}

b01/bai19.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <iostream>
2+
using namespace std;
3+
int main()
4+
{
5+
int x, y;
6+
cin >> x >> y;
7+
if (x % 7 == 0 && y % 7 == 0) cout << "true";
8+
else cout << "false";
9+
return 0;
10+
}

b01/bai20.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <iostream>
2+
#include <cmath>
3+
using namespace std;
4+
int main()
5+
{
6+
double x, y, z, p, S;
7+
cin >> x >> y >> z;
8+
p = (x + y + z) / 2;
9+
S = sqrt(p * (p - x) * (p - y) * (p - z));
10+
cout << S;
11+
return 0;
12+
}

0 commit comments

Comments
 (0)