c++ programs to be solved. ( ASAP)

Write a c++ program to custom exception handling.

i. implement a function to compute factorial of a given no.

ii. create a class " invaliddataexception" that contains the details about the exception- "invalid data : negative number entered"

iii.In the main function accept a number from the user and throu an exception of type "invaliddataexception" if the entered no is a negative number, else call the factorial function to compute the result.

iv. handle the exception.
Please note, that this is not a homework site. We won't do your homework for you. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attemts to solve this problem youself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again. As it is impossible to find deriviative of function without knowledge in ariphmetics, you cannot do more complex tasks in programming without clear understanding of basics
Topic archived. No new replies allowed.