Computer Science, asked by Anonymous, 11 months ago

First answer will be awarded brainliest
java program to display sum of following series
1! + 2! + 3! + 4! + 5!​

Answers

Answered by mn121
1

public class series

{

public static void main(String[] args)

{

int i,f,j,s=0;

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

{

f=1;

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

{

f=f*j;

}

s=s+f;

}

System.out.println("sum : "+s);

}

}

Hope it helps you...

Please mark it as brainliest...

☺️☺️☺️

Similar questions