2001

Grusel++ of the month

Home
Download Source
/******************************************************************************/
/*                                                                            */
/*                                                            FILE: april.cpp */
/*                                                                            */
/*  Determines the maximum of five variables in a single expression           */
/*  ===============================================================           */
/*                                                                            */
/*  Compiled and tested with Visual C++ V6.0                                  */
/*                                                                            */
/*  V1.00   25-APR-2001   P. Tellenbach   http://www.heimetli.ch/             */
/*                                                                            */
/******************************************************************************/

#include <iostream>

int main()
{
 int a = 3 ;
 int b = 4 ;
 int c = 1 ;
 int d = 2 ;
 int e = 0 ;

 std::cout << ( ( (a > b ? a : b) > (c > d ? c : d) ?
                  (a > b ? a : b) : (c > d ? c : d) ) > e ?
                ( (a > b ? a : b) > (c > d ? c : d) ?
                  (a > b ? a : b) : (c > d ? c : d) ) : e ) ;

 return 0 ;
}

Update 24. April 2021

This program still compiles and runs without any changes.