C++ Function Parameter Pass value to a function via parameter

Description

C++ Function Parameter Pass value to a function via parameter

#include <iostream>
using namespace std;
void showit(double, double);  // function prototype
int main()/*from www . j  av  a2s  . com*/
{
   showit(5.0, 53.1301);
   return 0;
}
void showit(double radius, double angle)
{
   cout << "\nThe polar coordinates are: " << endl;
   cout << "  Distance from origin: " << radius << endl;
   cout << "  Angle (in degrees) from x-axis: " << angle << endl;
   return;
}



PreviousNext

Related