#include <stdio.h>
int main ()
{
int idx; /* loop index */
printf ("Incrementing; \n");
idx = 1; /* initialization */
while (idx <= 5)
{
printf ("...%i", idx);
++idx; /* increment, same as: idx = idx + 1; */
}
printf ("\n\nDecrementing:\n");
idx = 5; /* initialization */
while (idx >= 1)
{
printf ("...%i", idx);
--idx; /* decrement, same as: idx = idx - 1; */
}
return (0);
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluICgpCnsKICAgICAgaW50IGlkeDsgIC8qIGxvb3AgaW5kZXggKi8KIAogICAgICBwcmludGYgKCJJbmNyZW1lbnRpbmc7IFxuIik7CiAgICAgIAogICAgICBpZHggPSAxOyAgLyogaW5pdGlhbGl6YXRpb24gKi8gCiAgICAgIHdoaWxlIChpZHggPD0gNSkKICAgICAgeyAKICAgICAgICAgICAgcHJpbnRmICgiLi4uJWkiLCBpZHgpOyAKICAgICAgICAgICAgKytpZHg7IC8qIGluY3JlbWVudCwgc2FtZSBhczogIGlkeCA9IGlkeCArIDE7ICovIAogICAgICB9CiAgICAgIAogICAgICBwcmludGYgKCJcblxuRGVjcmVtZW50aW5nOlxuIik7CiAgICAgIAogICAgICBpZHggPSA1OyAgLyogaW5pdGlhbGl6YXRpb24gKi8gCiAgICAgIHdoaWxlIChpZHggPj0gMSkgCiAgICAgIHsgCiAgICAgICAgICAgIHByaW50ZiAoIi4uLiVpIiwgaWR4KTsgCiAgICAgICAgICAgIC0taWR4OyAvKiBkZWNyZW1lbnQsIHNhbWUgYXM6ICBpZHggPSBpZHggLSAxOyAqLyAKICAgICAgfQogICAKICAgICAgcmV0dXJuICgwKTsKIAp9