Next: Arithmetic Operators
Up: Math Functions
Previous: Math Functions
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
n";
cin >> number;
cout<< "The exponential of t"<< number <<
"t is t" << exp(number)<< endl;
return 0;
}
Yousef Haik
2/23/1998