fork download
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int i;
  6. printf("%+*d$\n", 10, 1234);
  7. printf("%*d$\n", 10, 1234);
  8. printf("%-*s$\n", 10, "hogehoge");
  9. printf("%*s$\n", 10, "hogehoge");
  10. printf("%*s$\n", 0, "ふ");
  11. for (i = 4; i < 20; i+=2)
  12. {
  13. printf("%*s$\n", i, "は");
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 2724KB
stdin
Standard input is empty
stdout
     +1234$
      1234$
hogehoge  $
  hogehoge$
ふ$
 は$
   は$
     は$
       は$
         は$
           は$
             は$
               は$