#include<stdio.h>
int main()
{
int x;
int y;
int n=10;
x=n++;
printf ("Nilai x=%d dan n =%d\n",x,n);
y=++n;
printf ("Nilai y=%d n= %d\n",y,n);
x=n--;
printf ("Nilai x=%d dan n=%d\n",x,n);
y=--n;
printf ("Nilai y=%d dan n=%d\n",y,n);
getch();
return 0;
}
HomeContoh program menggunakan Increment Decrement
Posting Komentar