Expressions Program in C Language

  1. #include <stdio.h>  
  2. #include <stdlib.h>  
  3.   
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */  
  5.   
  6. int main(int argc, char *argv[])   
  7. {  
  8.     int x=7,y=-7,z=11,w=-11,s=9,t=10;  
  9.     x+=(y-=(z*=w/=(s%=t)));  
  10.     printf("x=%d,y=%d,z=%d,w=%d,s=%d,t=%d\n",x,y,z,w,s,t);  
  11.     t+=s-=w*=z*=y%=x;  
  12.     printf("x=%d,y=%d,z=%d,w=%d,s=%d,t=%d\n",x,y,z,w,s,t);  
  13.         return 0;  
  14.         getch();  
  15. }