The frst part of the program is working perfectly fine . The class useTest is linked to another class, Test , which is working out the first part of the program. I have an error in the bottom part of the program , can anyone help please ? thanks
import java.util.* ;
public class useTest {
public static void main ( String args[]) {
Scanner kb = new Scanner ( System.in) ;
System.out.print ( "\fPlease enter degrees : " ) ;
int d = kb.nextInt () ;
double r = (double)Test.toRadians (d) ;
System.out.println ( " Degrees is : " + d + " and radians is : " + r ) ;
}
public static int fact ( int d, double r ){
int fact , n , c = 1;
System.out.println("Enter an integer to calculate it's factorial");
Scanner kb = new Scanner(System.in);
n =kb.nextInt () ;
if ( n < 0 )
System.out.println("Number should be non-negative.");
else
{
for ( c = 1 ; c <= n ; c++ )
fact = 1*c ;
System.out.println("Factorial of "+n+" is = "+ fact); // ERROR IS HERE //
}
}
}