Showing posts with label Progrm to print certain pattern. Show all posts
Showing posts with label Progrm to print certain pattern. Show all posts

Progrm to print certain pattern

//Progrm to print following pattern
// * * * * *
// * * * * *
// * * * * *
// * * * * *
// * * * * *
#include<stdio.h>
#include<conio.h>
int main()
{
  int x,y;
  clrscr();
  for(x=1;x<=5;x++)
  {
     for(y=1;y<=5;y++)
     {
     printf(" * ");
     }

     printf("\n");
  }
  getch();
  return 0;
}


To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.