Thursday 16 August 2012

Loop control structure028


Concept of nested for loop.

#include <stdio.h>
#include <conio.h>

void main ( )
{
            int         i, j;
            clrscr ( );
            printf ("\n\t\t Concept of nested for loop");
            printf ("\n\n\n");
                                     
            for ( i = 1; i <= 6; i++ )
            {                                      
                            for ( j = 1; j <= 6; j++ )
                            {                        
                                            printf ("\t %d %d ", i, j);
                            }
                            printf ("\n");
            }
            getch ( );
}



No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...