Computer Science, asked by shrayashisingh, 1 month ago

write a program to print factorial of all number from 1 to 10 in java​

Answers

Answered by BatoolAmina
3

Answer:

class Factorial

{

public static void main(String args[])

{

int i,fact=1;

int number=10;//It is the number to calculate factorial

for(i=1;i<=number;i++)

{

fact=fact*i;

}

System.out.println("Factorial of "+number+" is: "+fact);

}

}

Explanation:

I hope it helps you.

Please mark me brainliest.

Answered by yuvika8843
3

Answer:

hope it will help u

thanku

Attachments:
Similar questions