-1

This is an assignment in vlab. I know the method needs to be outside the main method but I can't seem to understand how I can do it between the two comments. You can not edit the code outside of the // your code starts here and your code ends here. image of the question

first part of code last part of code

nate998
  • 11
  • 2
  • Welcome to Stack Overflow. Please take the [tour] to learn how Stack Overflow works and read [ask] on how to improve the quality of your question. Then [edit] your question to include your source code as a working [mcve], which can be compiled and tested by others. [Please do not upload images of code/errors when asking a question.](https://meta.stackoverflow.com/q/285551) – Progman Oct 19 '22 at 18:50

1 Answers1

-1

Why don't you try to return 0 or 1 as return. For example, 0 means False and 1 means True. Then write output statement inside a main method.

if(vals[i] == vals[i+1]){
   return 1; }
else{
   return 0; }
Shub
  • 168
  • 1
  • 4
  • Please read [answer]. What you have posted is, at best, a comment. You don't have enough rep to post comments yet. Contribute in other ways and don't post comments until you have the necessary rep. – Jim Garrison Oct 19 '22 at 19:00
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 22 '22 at 00:26