next up previous
Next: Arithmetic Operators Up: Math Functions Previous: Math Functions

Example




Write a program that can calculate the exponential of any number entered by the user on the screen. // This program can calculate the exponential
// of any number entered by the user
#include <iostream.h>
#include <math.h>

main( )
{
float number cout << "Please enter any number to find its exponential $\backslash$n";
cin >> number;
cout<< "The exponential of $\backslash$t"<< number << "$\backslash$t is $\backslash$t" << exp(number)<< endl;
return 0;
}


Yousef Haik
2/23/1998