Tata Technologies interview question

If else coding question and a numbers question