How to use "flag" in a sentence

Sentences

Captain Nemo put a black flag on the Nautilus with a yellow "N" in the centre of it

And then, coming from the direction of Horsell, I noticed a little black group of men, the first of whom was waving a white flag

An engineer told me that this was done by a man crawling forwards with a flag on a long pole

Over it was a British flag, flying cheerfully in the wind.