Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

write a c program to accept a number between 3 & 10 & print a square of stars. 
if user enters 4 the output should be as shown ****
                                               *  *
                                               *  *
                                               ****
#include <stdio.h>
main()
{
        int count;
  printf("
**************");         

  for( count = 1 ; count <= 8 ; ++count)
    print f("
*            *");       

  printf("
**************
");       
  
}