ホンマにprintf()でもやれるんや、
https://www.ipa.go.jp/security/awareness/vendor/programmingv2/contents/c906.html

しかし%nはC++11で廃止されたとあるからモダンなC++ではprintf()は安心、