Getting correct output but,produces warnings during code analysis for each of the variables declared as double. Tried best to give result for 1 hour period. Kindly check give solution to pass test.