i finally figured it out . the problem was caused by :

if ( 0 == (int)power)

and the likes,

i changed the power to an integer value out of the blocks and used that integer_power as a check in if statement continuation condition . and it worked!

here is the final bit of code

Code:

double Integral( const double multipicant,const double power,char sign[],int size,int operand_number)
{
double integral = 0.0;
static int i =5,y=7,index = 0;
int integer_power = 0;
int condition = 0;
if ( index == 5)
{
i = 5;
y = 11;
//condition = 1;
}
if ( index >5 )
{
i+=1;
y = 11;
}
integer_power = power;
if ( integer_power == 0 )
{
// gotoxy(35,30);
// printf("\tp1%d",power);
condition = 1;
gotoxy(i,y+4);
printf("%0.1fX",fabs(multipicant));
if ( index != operand_number-1 )
{
gotoxy(i+5,y+4);
printf("%c",sign[index]);
}
}
else if ( integer_power == -1)
{
condition = 0;
gotoxy(i,y+4);
printf("%0.2f * Ln(x)",fabs(multipicant));
if ( index != operand_number-1 )
{
gotoxy(i+14,y+4);
printf("%c",sign[index]);
}
}
else if ( ( integer_power != -1 )&& ( integer_power != 0 ) )
{
condition = 0;
gotoxy(i+9,y+2);
printf("%0.0f + 1",power);//powere X
gotoxy(i+7,y+3);
printf("( X )");//khode X
gotoxy(i,y+4);
printf("%0.2f *",fabs(multipicant));//multipicant
printf(" ------");//khate kasri
gotoxy(i+6,y+5);
printf(" %0.0f + 1",power);//poweremakhraj
if ( index != operand_number-1 )
{
gotoxy(i+14,y+4);
printf("%c",sign[index]);
}
}
if (condition == 1)
{
i+=6;
}
else
{
i+=15;
}
index++;
return integral;
}

thankyou everyone for your helps