What is wrong

This is my code: int doSomething(int inCome){ return(inCome*3); }

void loop(){ int aThing = doSomething(6); serial.print(inCome); }

this is my error: Homework:10:16: error: 'inCome' was not declared in this scope

serial.print(inCome);

^

exit status 1 redefinition of 'void loop()'

homework is the name of my file.

help plz lmao

Do something returns a value. Print that value not income.

This is my code:
int doSomething(int inCome){
return(inCome*3);
}




void loop(){
  int aThing = doSomething(6);
  serial.print(aThing);
}

This is my code:

Well, some of it anyway

Sorry, but I cannot guess what the full code looks like.

redefinition of 'void loop()'

How many loop() functions have you got in the program that you did not post ? How many tabs have you got open in the IDE ?

Did you read this before posting a programming question

I would guess not

When is our homework due ?

  int aThing = doSomething(6);
  serial.print(inCome);

If you're setting the value returned from doSomething() into variable aThing why are you trying to print some other variable?

Steve

The variable inCome is local to the function doSomething, therefore it cannot be used outside the function.

I can't see the source code. Perhaps my crystal ball is broken, or perhaps it does not work on homework.