37_sprintf.c 248 B

123456789101112131415161718
  1. #include <stdio.h>
  2. int main()
  3. {
  4. char Buf[100];
  5. int Count;
  6. for (Count = 1; Count <= 20; Count++)
  7. {
  8. sprintf(Buf, "->%02d<-\n", Count);
  9. printf("%s", Buf);
  10. }
  11. return 0;
  12. }
  13. /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/