fork(2) download
  1.  
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. int d;
  7. int m;
  8. int y;
  9. std::cin >> d; // read the day
  10. std::cin.get(); // ignore the slash
  11. std::cin >> m; // read the month
  12. std::cin.get(); // ignore the slash again
  13. std::cin >> y; // read the year
  14. std::cout << "input date: " << d << "/" << m << "/" << y << "\n";
  15. }
Success #stdin #stdout 0s 3300KB
stdin
30/06/2014
stdout
input date: 30/6/2014