Logical Operators (&&) and (||)

/*This program will demonstrate logical operations such as "and" (&&)
and "or" (||) */
#include <stdio.h>

main()
{
int x =3, y =2, z = 7;

if ( (x ==3) && (z !=3) )
{
printf("xxx%4i\n",y);
y = y + 3;
}
else
{
printf("###\n");
y = y + 1;
}

printf ("!!!%3i\n",y);

if ( (y == 2) && (z = 4))
printf("jjj\n");
else
printf("ZZZ\n");

if ( (x == 5) || (y >=1))
{
z = z + 3;
printf("nnn%4i\n",z+ 3);
}
else

z = z + 1;
printf("ppp%4i\n",z + 1);
}
printf("AAA%4iAA%3i",z,y);

if ( (z != 10) || (y >=6))
{
z = z - 6;
printf("$$$%3inn%2i\n",3,z);
}

if ( (z != 9) || (y >=6))
{
z = z - 2;
printf("$$$%3iAA%2i\n",3,z);
}


return 0;
}

/*
xxx 2
!!! 5
ZZZ
nnn 13
AAA 10AA 5$$$ 3AA 8
*/