I'm having trouble figuring out why this program runs what I think is an infinite loop. Specifically, I'm trying to use a while loop to raise a user defined number to a user defined power. The dilemma is that it never ends up printing.
// This program uses a loop to raise a number to a power.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int num, bigNum, power, count;
cout << "Enter an integer: ";
cin >> num;
cout << "What power do you want it raised to? ";
cin >> power;
bigNum = num;
count = 1;
while (count <= power);
{
bigNum *= num;
count++;
}
cout << "The result is " << bigNum << endl;
return 0;
}