Advertisement
Tony-S

cbb

Oct 5th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.22 KB | None | 0 0
  1. #pragma argsused
  2. int main(int argc, char* argv[])
  3. {
  4.   //Deklaration
  5.         int SEITE1;
  6.         int SEITE2;
  7.         int SEITE3;
  8.  
  9.         enum DREIECKTYP {NORMAL, GLEICHSCHENKLIG, GLEICHSEITIG, KEIN_DREIECK};
  10.  
  11.         //Kein Dreieck
  12.         //wenn 2 Seiten zusammen kürzer sind als die 3. Seite
  13.         if ( ((SEITE1 + SEITE2) <= SEITE3) || ((SEITE1 + SEITE3) <= SEITE2) || ((SEITE2 + SEITE3) <= (SEITE1))                                          )
  14.         {
  15.  
  16.         }
  17.  
  18.         //Gleichseitiges Dreieck
  19.         //wenn alle 3 Seiten gleich lang sind
  20.         if (SEITE1 == SEITE2 == SEITE3)
  21.         {
  22.  
  23.         }
  24.  
  25.         //Gleichschenkliges Dreieck
  26.         //wenn 2 Seiten gleich sind, die 3. Seite verschieden ist, aber es ein Dreieck ist
  27.         if ( ((SEITE1 == SEITE2) && (SEITE1 != SEITE3) ) || ( (SEITE1 == SEITE3) && (SEITE1 != SEITE2) ) or ( (SEITE2 == SEITE3) and (SEITE2 != SEITE1) ) )
  28.         {
  29.  
  30.         }
  31.  
  32.         //Unregelmaessiges Dreieck
  33.         //wenn alle Seiten verschieden sind, aber es ein Dreieck ist
  34.         if ((SEITE1 != SEITE2) and (SEITE1 != SEITE3) and (SEITE2 != SEITE3))
  35.         {
  36.  
  37.         }
  38. }         ;
  39. //---------------------------------------------------------------------------
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement