応用例2: nprintf