/****************************************************************************** Title : reading_assignment_01.cpp Author : Stewart Weiss Created on : August 26, 2012 Description : This is the code for your first reading assignment. Normally a description of the program would go in this preamble, but since this is part of your task, it is not included. Purpose : Reading assignment #1 for fall 2012, CSci 135.02 Usage : ./reading_assignment_01 Build with : g++ -o reading_assignment_01 reading_assignment_01.cpp Modifications : N/A Due date : September 6, 2012 at the beginning of the class ******************************************************************************/ #include using namespace std; int main() { double x; int e; int i = 1; double result; result = 1; cout << "Enter any number as the base: "; cin >> x; cout << "Enter a non-negative integer exponent: "; cin >> e; while ( i <= e ) { result *= x; ++i; } cout << result << endl; return 0; }