what is the problem in 1st code? when i use num=1 in 4th line i find unexpected error. and the 2nd code is working properly as expected. when i use int num=1; in 11th line