#include #include #include #include using namespace std; int main() { string filename; int b, p; ifstream inFile; ofstream outFile; cout << "Enter the name of the file the numbers are in: "; cin >> filename; inFile.open(filename.c_str()); outFile.open("output"); inFile >> b >> p; outFile << b << " to the " << p << " power is " << pow(b,p) << endl; inFile >> b >> p; outFile << b << " to the " << p << " power is " << pow(b,p) << endl; inFile >> b >> p; outFile << b << " to the " << p << " power is " << pow(b,p) << endl; inFile >> b >> p; outFile << b << " to the " << p << " power is " << pow(b,p) << endl; inFile >> b >> p; outFile << b << " to the " << p << " power is " << pow(b,p) << endl; }