code runs for 2 digit numbers