I'm wondering how to remove the stuff at the end of the console, where it says the execution time, press any key to continue, and what the process returned. I am using Codeblocks.
As well, I am wondering when I type in a letter, (for example, the letter h), it returns the number 51276552. Is there a way that I can restrict the user to only input a number?
The code is:
#include <iostream>
using namespace std;
int main()
{
int years;
cout << "How old are you? ";
cin >> years;
cout << "You are " << years * 12 << " months old.";
}