solve lightOJ 1305 - Area of a Parallelogram in c++
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
int ax, ay, bx, by, cx, cy, dx, dy, t, s;
cin >> t;
for(int i =1; i <= t; i++)
{
cin >> ax >> ay >> bx >> by >> cx >> cy;
dx = ax + cx - bx;
dy = ay + cy - by;
s = fabs((ax * by + bx * cy + cx * ay) - (bx * ay + cx * by + ax * cy));
cout << "Case " << i << ": " << dx << " " << dy << " " << s << endl;
}
return 0;
}
____ahmed shuvo 969
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন