The 5th of Prashant’s 15 Exercises for Learning a new Programming Language builds directly onto the 4th:
Modify the above program such that it will ask for 'Do you want to calculate again (y/n),
if you say 'y', it'll again ask the parameters. If 'n', it'll exit. (Do while loop)While running the program give value mu = 0. See what happens. Does it give 'DIVIDE BY ZERO' error?
Does it give 'Segmentation fault..core dump?'. How to handle this situation. Is there something built
in the language itself? (Exception Handling)
The first bit is easy, the second bit may be surprising. First thing I’ll do is show you what happens when I run the program from last time with mu = 0.