fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c;
  6. while (scanf("%d%*1[ .]%d%*1[ .]%d", &a, &b, &c) == 3) {
  7. printf("a=%d, b=%d, b=%d\n", a, b, c);
  8. }
  9. return 0;
  10. }
Success #stdin #stdout 0s 4364KB
stdin
1 2 3
1.2.3
stdout
a=1, b=2, b=3
a=1, b=2, b=3