``````//PROGRAM TO FIND DERIVATIVE(FIRST AND SECOND)OF POLYNOMIAL FUNCTIONS
#include<iostream.h>
#include<conio.h>

void main()
{
int i,d,coeff[100],degree[100];
clrscr();
cout<<"\nEnter the degree of the polynomial       : ";
cin>>d;
for(i=d;i>=0;i--)
{     if(i>1)
{
degree[i]=i;
cout<<"\nEnter the coefficient of x^"<<degree[i]<<" (with sign) : ";
cin>>coeff[i];
}
else if(i==1)
{
degree[i]=i;
cout<<"\nEnter the coefficient of x (with sign)   : ";
cin>>coeff[i];
}
else
{
degree[0]=0;
cout<<"\nEnter the constant term (if any)         : ";
cin>>coeff[0];
}
}
clrscr();
cout<<"\n Entered polynomial function   , f (x)=";
for(i=d;i>=0;i--)
{
if(coeff[i]>0&&degree[i]!=1)
{
if(degree[i])
cout<<"+"<<coeff[i]<<"x^"<<degree[i];
else
cout<<"+"<<coeff[0];
}
else if(coeff[i]<0&&degree[i]!=1)
{
if(degree[i])
cout<<coeff[i]<<"x^"<<degree[i];
else
cout<<coeff[0];
}
else if(coeff[i]!=0&&degree[i]==1)
{
if(coeff[i]>0)
cout<<"+"<<coeff[i]<<"x";
else
cout<<coeff[i]<<"x";
}
}
getch();
for(i=d;i>=0;i--)
{
coeff[i]*=degree[i];
degree[i]-=1;
}
cout<<"\n First derivative of function  , f'(x)=";
for(i=d;i>=0;i--)
{
if(coeff[i]>0&&degree[i]!=1)
{
if(degree[i])
cout<<"+"<<coeff[i]<<"x^"<<degree[i];
else
cout<<"+"<<coeff[i];
}
else if(coeff[i]<0&&degree[i]!=1)
{
if(degree[i])
cout<<coeff[i]<<"x^"<<degree[i];
else
cout<<coeff[i];
}
else if(coeff[i]!=0&&degree[i]==1)
{
if(coeff[i]>0)
cout<<"+"<<coeff[i]<<"x";
else
cout<<coeff[i]<<"x";
}
}
getch();
for(i=d;i>=0;i--)
{
coeff[i]*=degree[i];
degree[i]-=1;
}
cout<<"\n Second derivative of function , f\"(x)=";
for(i=d;i>=0;i--)
{
if(coeff[i]>0&&degree[i]!=1)
{
if(degree[i])
cout<<"+"<<coeff[i]<<"x^"<<degree[i];
else
cout<<"+"<<coeff[i];
}
else if(coeff[i]<0&&degree[i]!=1)
{
if(degree[i])
cout<<coeff[i]<<"x^"<<degree[i];
else
cout<<coeff[i];
}
else if(coeff[i]!=0&&degree[i]==1)
{
if(coeff[i]>0)
cout<<"+"<<coeff[i]<<"x";
else
cout<<coeff[i]<<"x";
}
}
getch();
}
``````

This is annoying me, so let me rant a bit on this.

First of all, I think your caps-lock key is defective or something. Writing everything in upper-case letters just makes you look stupid, I'm sure that's not your intent, so you might want to get that fixed.

Second, this forum is not for pasting code, the site for that is pastebin.com. The main purpose of this forum is education and discussion, your post achieves neither. You just post code without even asking a question or for feedback on it, or spurring any kind of discussion.

The code that you posted is not helpful to anyone either. There are many problems with your code:

• You use an antiquated, non-standard header: `<conio.h>`.
• You use the pre-standard header `<iostream.h>` which should now (since mid-90s) be `<iostream>`.
• You use pre-standard code in which the std-namespace doesn't seem to exist.
• Your main() function should return `int`, not `void`, and that's an error on many compilers.
• You use very old (C89) style of declaring all variables at the start of a function. This is a practice that is highly discouraged now, especially in the C++ realm.
• You pack your code very tightly with no spaces in-between things. This makes the code very hard to read, which is really bad for anyone who tries to learn from it, or tries to grade it.
• You don't have any comments anywhere.
• You use very short and un-intuitive names for your variables.
• Your code lacks any kind of functional separation, or data organization.
• Your code is very inefficient and repetitive.