Friday, 20 December 2013

Program to illustrate arithmetic operators


#include <stdio.h>
#include<conio.h>
void main()
{
int a,b,c,d;
a=10;
b=15;
c=++a-b;
printf("a=%d  b=%d  C=%d \n",a,b,c);
d=b++ +a;
printf("a=%d  b=%d  d=%d \n",a,b,d);
printf("a/b=%d \n",a/b);
printf("a*=b=%d\n",a*=b);
printf("%d\n",(c>d)? 1:0);
printf("%d\n",(c<d)? 1:0);
getch();
clescr();

}

No comments:

Post a Comment