Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
User needs to enter integers in new line until he enters a negative integer , we need to find the factorial of every number entered by the user except for the negative one. Please help!
Posted
Comments
CHill60 13-Dec-15 8:42am    
We don't do homework. It's set to help you learn.
Use the Improve question link to post the code that you have tried and explain where you are stuck

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 
For solving this problem you can make use of "while" loop.

Here is an example:

C++
while(n>0){

//ask the user to enter the number for finding factorial
//n is the number to be entered by the user for finding factorial.

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900