Thursday 16 August 2012

Loop control structure029

Write a program to construct square box of star.

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

void main ( )
{
           int          i, j, k;
           clrscr ( );
                  
           printf ("\n\t\t\t   Designee of Square Box");
           printf ("\n\n\n");
                                    
           for ( i = 1; i <= 16; i++ )
           {                                 
                           for ( k =1; k <=30; k++ )
                           {                      
                                           printf (" ");
                           }                                
                           for ( j = 1; j <= 16; j++ )
                           {                                    
                                           printf ("*");
                           }
                           printf ("\n");
           }   
           getch ( );
}



Click here to contact us

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...