Question icon
Grade 117 grade maths

How to write a Java program for factorialDo the programme with scanner

Profile image of Honey
8 Years agoGrade 11
Answers icon

1 Answer

Profile image of Sriesh
ApprovedApproved Tutor Answer8 Years ago
5! Is written as 5 factorialIt is 1*2*3*4*5Another example-7!1*2*3*4*5*6*7This means that u have to multiply everything before the numberStart the program as"Import Java.util.ScannerScanner sx=new Scanner(System.in);