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