Submission #2239985
Source Code Expand
#include <iostream> #include <cmath> using namespace std; int calcDirection(int deg); int calcWindPower(int dis); int main() { int x1; int x2; int x3; int y1; int y2; int y3; double s; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; s = fabs((double)(x1 * y2 + x2 * y3 + x3 * y1 - y1 * x2 - y2 * x3 - y3 * x1 ) / 2); cout << fixed << setprecision(3) << s << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 直訴 |
User | clan |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 444 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:22:36: error: ‘setprecision’ was not declared in this scope cout << fixed << setprecision(3) << s << endl; ^