http://www.daniweb.com/software-development/c/threads/15045/draw-sin-curve-w-user-input-how-to-code-sin in this link what is m_iSample, double iSinValue, int iFinalSinValue, and other stuffs????
Dear it is a programming language so when ever we use a variable of type double , int , float or etc we got to name it. and iSinValuer , count etc are name of those variables nothing more then this :) i hope u understand
i know that they are declarations but I do not know how they are used in the link ABOVE
for (count = 0; count<=m_iSample; ++count) { double iSinValue=sin(count * PI);//do the sin calculation int iFinalSinValue=iSinValue * 200;//convert result so that it will display correctly pDC->LineTo( ??? , iFinalSinValue);//draw the line } this is the code as u know for loop is m_iSample are user chosen lines iSinValue is a double variable that stores value of count*Pi that is o,1,2,3,4, upto lines chosen by the user. then iFinalSinValue is used to multply iSinValue with 200 // for conversion and last line is to draw it
can you help me draw a sin curve in C ????
actually m from JAVA brother i can only let u understand the code of C but i cant program it i can just give u a simple pseudocode :)
i can also understand java so dont worry xD
Join our real-time social learning platform and learn together with your friends!