If you use one %, it sees it as string (because it lacks other specifiers) and output %. If you use %%, it is to print % in output. if you use %%% the first two will be considered as outputting % and the last one as single "character". so you only get two %.