cs162/assignments/assignment1/magic.cpp
/*********************************************************************
 * ** Function: check_id
 * ** Description: This function checks to make sure that the user ID input by the user is all integers, if not it asks again
 * ** Parameters: string login
 * ** Pre-Conditions: login is given
 * ** Post-Conditions: Loding ID is ints or not ints
 * *********************************************************************/
check_id
Description: This function checks to make sure that the user ID input by the user is all integers, if not it asks again
Parameters: string login
Pre-Conditions: login is given
Post-Conditions: Loding ID is ints or not ints
check_id Description : This function checks to make sure that the user ID input by the user is all integers if not it asks again Parameters : string login Pre - Conditions : login is given Post - Conditions : Loding ID is ints or not ints
bool check_id(string login) {
	for(int i = 0; i < login.size(); i++) {
		if (!(login.at(i) >= '0' && login.at(i) <= '9')) {
			cout << "Login ID must be only integers!" << endl;
			return false;
		}
	}
	return true;
}
bool check_id ( string login ) { for ( int i = 0 ; i < login . size ( ) ; i ++ ) { if ( ! ( login . at ( i ) >= ' ' && login . at ( i ) <= ' ' ) ) { cout << " " << endl ; return false ; } } return true ; }
** Function: check_id
 ** Description: This function checks to make sure that the user ID input by the user is all integers, if not it asks again
 ** Parameters: string login
 ** Pre-Conditions: login is given
 ** Post-Conditions: Loding ID is ints or not ints
** Function : check_id ** Description : This function checks to make sure that the user ID input by the user is all integers if not it asks again ** Parameters : string login ** Pre - Conditions : login is given ** Post - Conditions : Loding ID is ints or not ints