MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / main

Method main

Programs/FactorialDemo.java:2–9  ·  view source on GitHub ↗
(String args[])

Source from the content-addressed store, hash-verified

1class FactorialDemo {
2 public static void main(String args[]){
3 int fact = 0;
4 for (int i=0; i<=10; i++) {
5 fact = factorial(i);
6 System.out.println("factorial of "+i+" is: "+fact);
7 }
8
9 }
10 static int factorial(int n){
11 if (n == 0)
12 return 1;

Callers

nothing calls this directly

Calls 1

factorialMethod · 0.95

Tested by

no test coverage detected