I was trying to verify if the entered value was an integer with the type id function. I know that the returned value would be i and not integer. I don't know why any entered value returns false and the programs stops. Any help would be appreciated.  

**The program works fine without the while statement**

```
#include <iostream>
#include <typeinfo>
using namespace std;

int main() {
    int number, factorial;
    cout << "Enter a number: ";
    cin >> number;
    factorial = 1;
    while (typeid(number).name() == "i") {
        for (int i = number; i >= 1; --i){
            factorial *= i;
        }
        cout << factorial;
    }
}

```