Advertisement
MeehoweCK

Untitled

Aug 9th, 2021
845
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     double a, b, c;
  9.     cout << "Podaj dlugosci trzech bokow: ";
  10.     cin >> a >> b >> c;
  11.     if(a <= 0 || b <= 0 || c <= 0)
  12.         cout << "Podano nieprawidlowe dlugosci bokow.\n";
  13.     else
  14.     {
  15.         if(a >= b + c || b >= a + c || c >= a + b)
  16.             cout << "Z bokow o podanych dlugosciach nie da sie zbudowac trojkata.\n";
  17.         else
  18.         {
  19.             // tutaj wpisz kod
  20.         }
  21.     }
  22.        
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement