Value not showing

i have written the exact code but it is saying i is not declared in the scope