hello everyone...hope all of u might understand the problem..i tried my best...Im trying to make a program in java..but i don't know the logic to solve my problem..the problem is "Make a program in java language and take C program as input no need to input body of C program only just call function and calculate number of subordinate function of each function in the program.Input is like this....

main()
{A();
 B();
 C();}

 A()
 {D();}

  B()
  {E();}

  C()
  {F();}

  D()
  {}

  E()
  {}

  F()
  {}" 
  So here are "main" function have 3 subordinate function, A,B,C function have 1,1,1 subordinate functions

Forget the Java program for now. Try calculating the subordinate functions by hand with a pencil and paper. Think about how you did that. This will give you the logic you need. Now try to write that in Java.