0

I've Been Trying For an Hour

The factorial of a number N is equal to 1 * 2 * 3 * ... * N For example, the factorial of 5 is 1 * 2 * 3 * 4 * 5 = 120. The given program takes a number from the input. I figured it out. Task Create a program to calculate and output the factorial of that input number. Please explain to me how to solve and understand this. Edit: I forgot to add that its in C# and I have to do it with "for()" loops.

10th May 2025, 4:23 PM
Lucky
Lucky - avatar
8 odpowiedzi
+ 4
Djman what you want to understand, already all the key points are explained Make a factorial is easy and fun! Just take a variable and let user input something and make a program which will do the factorial of user input, want help on creating a factorial code? here is a sample code for your better understanding:- https://sololearn.com/compiler-playground/cQ08w55jHD8r/?ref=app
10th May 2025, 4:48 PM
Alhaaz
Alhaaz - avatar
+ 6
Alhaaz , i can understand that your intention is to help the questioner. but it is not seen as very helpful when we are going to post a ready-made code, as long as the op has not shown his attempt here. it is more helpful to give hints and tips, so that the op has a chance to find a solution by himself.
10th May 2025, 7:08 PM
Lothar
Lothar - avatar
+ 5
Show what you have been trying for an hour. Show your code attempt.
10th May 2025, 5:14 PM
Lisa
Lisa - avatar
+ 4
As Lisa said, show what you have so far in C#. This guide will help us to help you: https://sololearn.com/compiler-playground/Wek0V1MyIR2r/?ref=app
10th May 2025, 6:08 PM
Ausgrindtube
Ausgrindtube - avatar
+ 3
Lothar My Bad, sorry i know that but i totally ignored it in this case idk why maybe cuz factorial code are fun to made... anyways next time I'm not gonna do such things... Thanks for reminding me!
11th May 2025, 5:27 AM
Alhaaz
Alhaaz - avatar
+ 2
Lisa, Alhaaz I forgot to add that its in C# and I have to do it with for() loops.
10th May 2025, 5:37 PM
Lucky
Lucky - avatar
+ 2
FeNneK I'm pretty sure that if the user who made a code private shares the link, then its visible to those who have the link.
11th May 2025, 6:20 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
Ausgrindtube, so even private code snippets are linkable in Q&A Discussions and personal feeds?
11th May 2025, 3:38 PM
FeNneK
FeNneK - avatar