Program to make "Pieslice" without using library function?
You can use the sine and cosine functions to do this. Normally they start on the x axis and rotate counter-clockwise. The start point can be found by calculating:

startX = x + cos(startRadians) * radius;
startY = y + sin(startRadians) * radius;


Likewise the ending coordinates are:

endX = x + cos(endRadians) * radius;
endY = y + sin(endRadians) * radius;


Note that sin() and cos() take their parameters in radians. Given that stangle and endangle are integers, I'm guessing they're probably in degrees so you'll need to convert them by doing something like:

double startRadians = (double)stangle * M_PI / 180.0;


etc.

If you want to draw the entire pie wedge, you'll need to iterate from the start angle to the end angle and calculate every n degrees along the curve.