C Graphics Program to Draw Star Shape on Command Line Full Project For Beginners

  • Post author:
  • Post category:c++
  • Post comments:0 Comments

 

 

star.c

 

 

#include<stdio.h>
#include<graphics.h>
  int main()
   {
    int gd = DETECT, gm ;
    initgraph(&gd,&gm,"");

    setfillstyle(1,14);
    line(300,65,150,275);
    line(300,65,450,275);
    line(150,275,450,275);
    floodfill(305,105,15);

    line(150,145,300,360);
    line(150,145,450,145);
    line(300,360,450,145);
    floodfill(195,185,15);
    floodfill(395,185,15);
    floodfill(305,350,15);
    getch();
    return 0;
   }

Leave a Reply