Advertisement
Ilya_konstantinov

Untitled

Nov 22nd, 2024
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | Source Code | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4.  
  5. #include "func.h"
  6.  
  7. int main() {
  8.     long long x1, x2, x3, y1, y2, y3;
  9.     std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  10.     std::cout << "Square area: " << Area(x1, y1, x2, y2) << '\n';
  11.     std::cout << std::fixed << std::setprecision(6) << "Triangle area: " << Area(x1, y1, x2, y2, x3, y3) << '\n';
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement