fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cout << "Podaj dl. bokow trojkata:\n";
  6. float a, b, c;
  7. cout << "a = ";
  8. cin >> a;
  9. cout << "b = ";
  10. cin >> b;
  11. cout << "c = ";
  12. cin >> c;
  13.  
  14. if( CzyBedzieTr( a, b, c ) )
  15. {
  16. cout << "Mozna z tego zbudowac trojkat";
  17.  
  18. RodzTr trojkat;
  19. trojkat = prost;
  20.  
  21. switch( trojkat )
  22. {
  23. case prost:
  24. cout << " prostokatny";
  25. break;
  26. case ostr:
  27. cout << " ostrokatny";
  28. break;
  29. case rozwart:
  30. cout << " rozwartokatny";
  31. break;
  32. }
  33.  
  34. cout << " o polu " <<( PoleTr( a, b, c ) ) << "\n";
  35. }
  36. else
  37. cout << "Z tego nie da sie zrobic trojkata!\n";
  38.  
  39. system( "pause" );
  40. return 0;
  41. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:14:30: error: ‘CzyBedzieTr’ was not declared in this scope
     if( CzyBedzieTr( a, b, c ) )
                              ^
prog.cpp:18:9: error: ‘RodzTr’ was not declared in this scope
         RodzTr trojkat;
         ^
prog.cpp:18:16: error: expected ‘;’ before ‘trojkat’
         RodzTr trojkat;
                ^
prog.cpp:19:9: error: ‘trojkat’ was not declared in this scope
         trojkat = prost;
         ^
prog.cpp:19:19: error: ‘prost’ was not declared in this scope
         trojkat = prost;
                   ^
prog.cpp:23:14: error: the value of ‘prost’ is not usable in a constant expression
         case prost:
              ^
prog.cpp:19:19: note: ‘prost’ was not declared ‘constexpr’
         trojkat = prost;
                   ^
prog.cpp:26:14: error: ‘ostr’ was not declared in this scope
         case ostr:
              ^
prog.cpp:29:14: error: ‘rozwart’ was not declared in this scope
         case rozwart:
              ^
prog.cpp:34:48: error: ‘PoleTr’ was not declared in this scope
         cout << " o polu " <<( PoleTr( a, b, c ) ) << "\n";
                                                ^
stdout
Standard output is empty