Day 15
Hello
Today's lesson some people will know its importance, especially students of the mathematics department or students who love mathematics like me
Whoever studied mathematics before and was attentive, and I advise everyone to listen to the lessons, especially mathematics, it opens the mind and strengthens it and makes a person creative and is important in programming and problem solvingWe don't have to complete our topic that talks about factorial for those who do not remember it, it is the result of multiplying the chosen numbers by the numbers that precede it, for example factorial of 5 = 1*2*3*4*5*=120
They are important properties for engineers and those who need mathematics in their work, such as accountants as well
We start the code by asking the user to enter the number he wants for the factorial, let it be 5
After that, we use for loop and put the beginning 1 and it continues to multiply by the numbers following one in the middle of a closed loop until it reaches the number for which the factorial is desired, and then the loop stops and the result will be printed
There is a tool called nest loop and we will get to know this tool in tomorrow's blog
تعليقات
إرسال تعليق