Implement the following using C and JAVA. Tabulate the running time of the programs by executing the programs for varying size of input. Also tabulate and observe if the running times of the programs differ due to difference in the programming languages.
Time calculation – Java
long startTime = System.currentTimeMillis(); // Number of millisec from Jan 1st 1970
long endTime = System.currentTimeMillis();
long totalTime = endTime - startTime;
Time calculation – C
1. Compile your program
2. Run your compiled program as follows