0
Wap to print factorial of a number using for loop only upto 13
4 Antworten
+ 1
Do you want that someone write a web app for you or what is here your question?
+ 1
Before you start to harrass other you should first learn to write well described and clear question.
So maybe this answer fit better to you :D
You can use for instances a for-loop start from number a. And it is looked for the factorial of a.
So why then not just:
long result = 0;
for (int i = a; i > 0; i--) {
result *= i;
}
System.out.print(result);
'a' can be a number from 1 to 20.
- 1
it means write a program
- 1
Erik,you don't know basic thing