Math, asked by Ambika7106, 10 months ago

please answer it.....​

Attachments:

Answers

Answered by LakshmishreeR
0

import java.util.*;

public class Main

{

public static void main(String args[])

{

Scanner ob=new Scanner(System.in);

int a, fact=1;

System.out.println("Enter a number:");

a=ob.nextInt();

for(int i=1;i<=a;i++)

{

fact=fact*i;

}

System.out.println("The factorial of a number:"+fact);

}

}

Mark me as brainliest

Similar questions