Third Polynomial Degree Function


Program to evaluate up to third polynomial degree function with default argument in C++







#include<iostream.h>
#include<conio.h>
void printvalues(int nvalue1, int nvalue2=10 )
{
          cout<<"1st : "<< nvalue1<< endl;
          cout<<"2st : "<< nvalue2<< endl;
}
void main()
{
          clrscr();
          cout<<"\nOutput with default argument:\n";
          printvalues(1);
          cout<<"\nOutput without default argument:\n";
          printvalues(1,3);
          getch();
}

OUTPUT::

Output with default argument:
1st : 1
2st : 10

Output without default argument:
1st : 1
2st : 3


-----

Firoz Memon

Please view my other blogs:

          C++ Codes 4 Beginners

          Java Tips

          Java 4 Beginners

Previous Post Next Post