Submission #2592526


Source Code Expand

#include <iostream>
#include <cmath>
using namespace std;

int main() {
	int x[3], y[3];
	for (int i = 0;i < 3;i++)cin >> x[i] >> y[i];
	cout << double abs((x[1] - x[0])*(y[2] - y[0]) - (x[2] - x[0])*(y[1] - y[0])) / 2 << endl;
}

Submission Info

Submission Time
Task C - 直訴
User mine691
Language C++14 (GCC 5.4.1)
Score 0
Code Size 237 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:10: error: expected primary-expression before ‘double’
  cout << double abs((x[1] - x[0])*(y[2] - y[0]) - (x[2] - x[0])*(y[1] - y[0])) / 2 << endl;
          ^