The header file graphics.h contains sector() function which draws and fills an elliptical pie slice with (x, y) as center, (s_angle, e_angle) as starting and ending angle and (x_radius, y_radius) as x and y radius of sector.
void sector(int x, int y, int s_angle, int e_angle, int x_radius, int y_radius); where, (x, y) is center of the sector. (s_angle, e_angle) are starting and ending angles. (x_radius, y_radius) are x and y radius of sector.
Input : x = 200, y = 200, s_angle = 0, e_angle = 150, x_radius = 50, y_radius = 65 Output : Input : x = 200, y = 200, s_angle = 30, e_angle = 120, x_radius = 90, y_radius = 85 Output :
Below is the implementation of sector() function :
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- How to call function within function in C or C++
- Write a one line C function to round floating point numbers
- Does C support function overloading?
- How can I return multiple values from a function?
- What is the purpose of a function prototype?
- How to declare a pointer to a function?
- C function to Swap strings
- Can we call an undeclared function in C++?
- What is evaluation order of function parameters in C?
- Can we use function on left side of an expression in C and C++?
- Function Pointer in C
- Importance of function prototype in C
- What happens when a function is called before its declaration in C?
- Default arguments and virtual function
- Function overloading and const keyword
- How to measure time taken by a function in C?
- Comparator function of qsort() in C
- Can we access private data members of a class without using a member or a friend function?
- Print substring of a given string without using any string function and loop in C
- How to print range of basic data types without any library function and constant in C?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Akanksha_Rai