--- In [email protected], Robert Ryan <[EMAIL PROTECTED]> wrote:
>
>
> this code works, but if I want the user to enter numbers, how do I
do that
> #include<iostream>
> #include<math.h>
> using namespace std;
> int main()
> {
> double double1, double2;
> char operation;
> cout << "Enter a double and raise it to a power\n ";
> cin >> double1 >> operation >> double2;
> if(operation == '^')
> cout << double1 << operation << double2
> << "=" << double1 + double2 << "\n";
> cout << "2 ** 10 = " << pow(double (2), double (10)) <<
endl;
> return 0;
why have you done double1+double2?
>
>
> ---------------------------------
> Never miss a thing. Make Yahoo your homepage.
>
> [Non-text portions of this message have been removed]
>