Sunday, October 3, 2010

write a program to using arithmetic operator in c?

#include
#include
void main()
{
int a;
clrscr();
printf("\n\t Enter the Value of A\t:\t");
scanf("%d",&a);
printf("\n\n\t Value of A is\t\t:\t%d",a);
printf("\n\n\t Value of A is\t\t:\t%d",++a);
printf("\n\n\t Value of A is\t\t:\t%d",a++);
printf("\n\n\t Value of A is\t\t:\t%d",a);
printf("\n\n\t Value of A is\t\t:\t%d",--a);
printf("\n\n\t Value of A is\t\t:\t%d",a--);
printf("\n\n\t Value of A is\t\t:\t%d",a);
getch();
}

No comments: