Headlines
Loading...
C Program to display following pattern of *

C Program to display following pattern of *

C Program to display following pattern

#include<stdio .h="">
#include<conio .h="">
void main()
{
int n,i,j;
clrscr();
printf("\nEnter the number:");
scanf("%d",&amp;n);
for(i=1;i&lt;=n;i++)
{
     if(i%2==0)
  printf(" ");
     for(j=1;j&lt;=n;j++)
       {
          printf("*");
       }
   printf("\n");
}
getch();
}

****************OUTPUT***********

Enter the number:8
********
 ********
********
 ********
********
 ********
********</conio></stdio>
*** PLEASE checkout the Best deals from for top sites like Amazon, Flipkart etc ***