Added loopung until correct input is given.
Added looping until correct input is given and loop for another calculation.
Solved the infinite looping bug.