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:
Take a step-up from those "Hello World" programs. Learn to implement data structures like Heap, Stacks, Linked List and many more! Check out our Data Structures in C course to start learning today.
My Personal Notes arrow_drop_up