Muscle Java
Thursday, October 17, 2019
Find Factorial of a number
Program
package fact;
public class Fact
{
public static void main(String[] args)
{
int n= 5;
int fact = 1, i;
for (i=2; i<=n; i++)
{
fact = fact * i;
}
System.out.println(fact);
}
}
Video explanation
1 comment:
Unknown
March 5, 2022 at 9:53 AM
Interface concept or not .??
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Interface concept or not .??
ReplyDelete