The posted code doesn't compile so it wouldn't be a correct answer.
When the code compiles, executes and prints out the right answer, then it might be ok.
Type: Posts; User: Norm
The posted code doesn't compile so it wouldn't be a correct answer.
When the code compiles, executes and prints out the right answer, then it might be ok.
can you explain what problems you are having?
The assignment says to define a method. You should start with the definition for the header of the method.