Nested for loops controlled by letters: - C Statement

C examples for Statement:for

Description

Nested for loops controlled by letters:

Demo Code

#include <stdio.h>
int main()//from ww  w . jav  a2  s. c  om
{
   int a;
   char b;
   printf("Here is thy grid...\n");
   for(a=1;a<10;a++)
   {
      for(b='A';b<'K';b++)
      {
         printf("%d-%c ",a,b);
      }
      putchar('\n');  /* end of line */
   }
   return(0);
}

Result


Related Tutorials