/* This program will prompt for the number of times */
/* a loop will be executed. It shows how to print   */
/* a loop going from 1 to the loop count and        */
/* vice versa from the loop_count to 1.             */
 
#include <stdio.h>
int main ()
{
	int loop_count; /* number of times to loop */
    int idx;        /* loop index */
 
    /* Prompt for the number of times to loop */
    printf ("Enter the number of times to loop\n");
    scanf ("%i", &loop_count);
 
    printf ("\nIncrementing; \n");
    for ( idx = 1; idx <= loop_count; ++idx )
    {
        printf ( "...%i", idx );
    }
 
    printf ("\n\nDecrementing:\n");
    for ( idx = loop_count; idx >= 1; --idx )
    {
        printf ( "...%i", idx );
    }
 
   return (0);
 
}