If you try to 'cin >>' something that isn't a number into a number variable, a flag will be set on cin. if ( cin ) will tell you whether any flags have been set or not.
If you don't do usingnamespace std;
at the start of your code, you have to put std:: before a bunch of things that come from the standard library. Using namespace std is actually bad practice, which is why many people here don't use it.
I am also looking for a variable which it stores all my inputs read the variables into a static array or some sort of dynamic container such as a vector.