Alright for my 1 paper i am writing this sentence and i don't know if its grammatically correct.

All I could think of was “what in the world am I going to invent!?”

Does that sound right or did i mess something up?

If you put a capital at the beginning and delete the exclamation point at the end (keeping the question mark), the sentence will be fine.