gud am...i am currently working with a project of mine which is about derivative...an d i am having some problem with the printing of the derivative...
here is the block of code i used:
/* print derivative of each term */
x=30;
gotoxy(x, 15);
if(exponent!=0) {
if(coefficient* exponent>=1){
printf("%d",coe fficient*expone nt);
x++;
}
if(exponent-1>=1){
printf("%c",var iable);
x++;
if(exponent-1!=1){
printf("%d",exp onent-1);
x++;
}
}
else if(exponent-1==0){
printf("%c",ope rator[ctr]);
x++;
}
}
else{
printf("0 %c ",operator[ctr]);
x++;
}
}
could someone help me why it always prints on the location coordinates (30, 15)? i would gladly and humbly accept any comments or suggetstions that would help me in this work...gud day...
here is the block of code i used:
/* print derivative of each term */
x=30;
gotoxy(x, 15);
if(exponent!=0) {
if(coefficient* exponent>=1){
printf("%d",coe fficient*expone nt);
x++;
}
if(exponent-1>=1){
printf("%c",var iable);
x++;
if(exponent-1!=1){
printf("%d",exp onent-1);
x++;
}
}
else if(exponent-1==0){
printf("%c",ope rator[ctr]);
x++;
}
}
else{
printf("0 %c ",operator[ctr]);
x++;
}
}
could someone help me why it always prints on the location coordinates (30, 15)? i would gladly and humbly accept any comments or suggetstions that would help me in this work...gud day...
Comment