Doing some coding

Today, I tried to write code that involves actual problem solving I wrote a method that calculates the factorial of a number, here’s how I did it : [sourcecode language=”java”] public static double calculate(int number){ if (number > 0){ int result = 1; for(int i = 1; i <= number; i++){ result *= i; } return result; } else if(number […]