fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int dd = 1, mm = 9, yy = 7;
  6. char s[25];
  7. sprintf(s, "%02d - %02d - %04d", mm, dd, yy);
  8. cout << s;
  9. return 0;
  10. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
09 - 01 - 0007