C program to design a carrom board using graphics
In this article, we will discuss how to draw a Carrom Board using Graphics.
- Create the outline of the board using the rectangle() function.
- Create another smaller rectangle inside the bigger one using the rectangle() function.
- Create a total of four circles at each corner which will be the pockets of the carrom board by using the circle() function.
- Color the circles created in the above step with a dark gray color by using two functions setfillstyle() and floodfill() function.
- All the other parts of the Board will be colored brown using the same functions.
- Create another circle by using the circle() function that represents the central circle of the board.
- Color all the remaining circles with a red color by using the same two functions setfillstyle() and floodfill().
Below is the implementation of the above approach:
Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up