Computer Science, asked by NesaPearl, 7 months ago

Program to calculate the factorial of a given number.
Factorial of a num. 1*2*3*.......*
num
for example .
It is devoted as num!
calculate :
6!
1*2*3* 4*5 *6 = 720​

Answers

Answered by Anonymous
3

Answer:

class factorial

{

p.s.v.m( int n )

{

int i , a= 1 ;

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

{

a= a*i ;

}

S.o.pln ( " The factorial " + a ) ;

}

}

Explanation:

USING SCANNER

mark me BRAINLIST ✔️

Similar questions