Write a program in C++ to calculate the value of exp(r) in 0.1 increments from r = 0 to 2.0.
#include <iostream> #include <math.h> /* exp */ using namespace std; int main () { double r; double x; for (r=0;r<=2;r=r+0.1) { x=exp(r); cout <<"The exponential value of "<< r <<" is "<< x << endl; } return 0; }