fork(8) download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int year, month, day;
  5. scanf("The date is [%d/%d/%d]", &year, &month, &day);
  6. printf("year = %d\n", year);
  7. printf("month = %d\n", month);
  8. printf("day = %d\n", day);
  9. }
Success #stdin #stdout 0s 15240KB
stdin
The date is [2007/01/31]
stdout
year = 2007
month = 1
day = 31