/*----------------------------------------------------------------------*/
/*                          IncDec.cpp                                  */
/* Demonstrates unary operator prefix and postfix modes                 */
/* Authored By : H.P.Kasmaei                                            */
/* Last Update : february 22, 2009                                      */
/* http://www.hpkclasses.ir/                                            */
/*----------------------------------------------------------------------*/

#include <iostream.h>

int a, b;

main()
{
      /* Set a and b both equal to 5 */

      a = b = 5;

      /* Print them, decrementing each time. */
      /* Use prefix mode for b, postfix mode for a */

      cout<<"\n"<< a-- << --b;
      cout<<"\n"<< a-- << --b;
      cout<<"\n"<< a-- << --b;
      cout<<"\n"<< a-- << --b;
      cout<<"\n"<< a-- << --b;

      return 0;
}



