Submission #333500
Source Code Expand
#include <stdio.h> struct coord { double x, y; }; int main(void) { struct coord a, b, c; double ans; scanf("%lf%lf%lf%lf%lf%lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y); ans = ((b.x - a.x)*(c.y - a.y) - (c.x - a.x)*(b.y - a.y)) / 2.0; (ans >= 0) ? ans : ans = -ans; printf("%lf\n", ans); return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 直訴 |
User | kamesetuna |
Language | C (GCC 4.6.4) |
Score | 0 |
Code Size | 323 Byte |
Status | CE |
Compile Error
./Main.c: In function ‘main’: ./Main.c:13:25: error: lvalue required as left operand of assignment ./Main.c:11:7: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]