New course! Every coder should learn Generative AI!
Try a free lesson+ 1
This code not execute properly try to figure out why
1 Answer
+ 9
You haven't called the method from main. Also, when we write "Double", it refers to wrapper class Double. In this case you can simply use regular data type "double".
Fixed version: https://code.sololearn.com/cKp4JSqh9xnz/?ref=app