fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8. double d;
  9. char c;
  10. while (cin >> d >> c)
  11. {
  12. cout << "d: " << d << ", c: " << c << endl;
  13. }
  14. }
Success #stdin #stdout 0s 3464KB
stdin
2g 2h 2a 2b 2x
stdout
d: 2, c: g
d: 2, c: h
d: 2, c: a
d: 2, c: b
d: 2, c: x