Showing posts with label WAP to add 1 and subtract 1 from value of a and b (Incremental / Decremental Operators). Show all posts
Showing posts with label WAP to add 1 and subtract 1 from value of a and b (Incremental / Decremental Operators). Show all posts

INCREMENTAL / DECREMENTAL

WAP to add 1 & subtract 1 from value of a & b

(Incremental & Decremental Operators)

void main ()

{

int a,b;

clrscr();

printf ("Enter A: ");

scanf ("%d",&a);

printf ("Enter B: ");

scanf ("%d",&b);

a++;

b--;

printf ("\nA is %d",a);

printf ("\nB is %d",b);

getch ();

}


Labels