loop(Refer, L-7,L-8,L-9).
Q1. WAP to accept a number and calculate the factorial of a number.
Answers
Answered by
0
Answer:
Good night bro sleep now
Answered by
0
Answer:
- public class calculate {
- public void factorial {
- long i=0, fact =1;
- i=num;
- while (i!=0);
- { fact=fact*i;
- --i;
- }
- System out.println("The factorial of "+ num+"is"+fact);
- }
- }
Similar questions