input problem

hi guys, what code do I need to use to check if a integer variable got the right value when someone input a value using scanf or cin?

#include <iostream.h>

int main()
int n;
cin >> n; //User input integer? or string?
cout << n;
return 0;
}

thanks
Topic archived. No new replies allowed.