Thursday, September 23, 2010

Nested Loops (2010 09 23)

# include <stdio.h>
main()
{
    int i;
    int j;
    for(i = 1 ; i<=12 ; i++)
    {
        printf("%s%d\n"," ------------------ " , i);
        for(j=1 ; j <=12 ;j++)
        {       
            printf("%d%s%d%s%d\n",i," X ",j ," = " , i*j );
        }
    }   
}

No comments:

Post a Comment