Skip to main content
Search
Search This Blog
Livecodo
Pages
Home
Courses
Blog
About us
More…
Share
Get link
Facebook
X
Pinterest
Email
Other Apps
April 10, 2024
Java program for factorial of a number
import java.util.*; public class W1 { public static void main(String[] args) { Scanner n=null; int a,b=1,c; n=new Scanner(System.in); System.out.println("ENter"); a=n.nextInt(); for(c=1;c<=a;c++) { b=b*c; } System.out.println(b); } }
Popular Posts
March 26, 2024
Dynamic Memory allocation in C
May 18, 2024
Searching and sorting Algorithm in C