Expected Unqualified-ID Before 'do'(and 'while')
The do whiles are outside of the setup() or loop(), so they won't work. 

I would suggest doing a simple C/C++ tutorial like this one to get up to speed with how things work.