C program to create Indian National Flag using Graphics
In this article, we will discuss how to draw the Indian National Flag using Graphics.
- Draw a rectangle using the function rectangle().
- Equally, divide the above rectangle into three parts by creating the line using the function line().
- Draw double lines on each other i.e., draw 4 lines and among them, 2 lines will act as a divider between Red (Light red as there is no direct saffron color present in the graphics library) & White, and the other 2 lines will divide White and Green color.
- The Ashoka Chakra will be made using the function circle().
- To finish, all the spaces will be filled using the functions setfillstyle() and floodfill().
Below is the implementation of the above approach:
My Personal Notes arrow_drop_up