How to write a program that (detailed stetp-by-step description of how to do this in the homework problem).
How to write?
Start arduino IDE.
Plug in arduino board.
Upload empty program. IDE should say "OK!". Program should do nothing.
If not work, adjust your port/board settings in the menu
In setup, turn on serial, print hello world. Upload program. Check serial monitor. Serial monitor should say "hello world".
In loop. read character and echo it back out. Open serial monitor and type. You should see double characters
In loop, read into array, limited by any white space. Then print out array. In serial monitor, you shouls see yu characters echoed a word at a time.
In loop, convert array into number with stod (i think) echo number back to serial. You should see the number you enter, but the format might change. eg, you enter 1e-2 , you get back 0.01 .
Write empty primecheck function. Make it always return false. In loop, pass number to primecheck, inspect result, print "(number) is prime" or "(number) is not prime". Confirm that in serial, you can put in a number and it always says "(number) is not prime".
Alter primecheck function to always return true. Confirm that in serial, you can puti n a number and it always says "(number) is prime".
Code up primecheck according to the very detailed and explicit instructions your teacher gave you.