line 159 should have change into this while( o >= 0)
if you are doing do-while loop you need to have do in line 22 otherwise just parenthesis.
line 5 remove the semicolon (hehe i often put a semicolon on main function too)
you could move the int main() in line 19 if you want the declaration to be global variables