Interface
Interface
Scanner;
interface In1
{
public void fact();
public void show1();
}
interface In2
{
public void sum_digit();
public void show2();
}
interface In3
{
public void rev_digit();
public void show3();
}
interface In4
{
public void trangle();
}
}
}
class Inter
{
public static void main(String[] args)
{
all a=new all();
a.fact();
a.show1();
a.sum_digit();
a.show2();
a.rev_digit();
a.show3();
a.trangle();
}
}
Output
Enter the number whose find the factorial= 5
Factorial =120
Enter the number whose find the Sum of Digit= 12
Sum of Digit =3
Enter the number whose find the Reverse of Digit= 321