added factorial and square programs