#include <cstdio> using namespace std; int main(){ printf("%!4d\n", 2); printf("%04d\n", 2); return 0;}
Standard input is empty
%!4d 0002
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!