fork(71) download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. int n; char c;
  6. while (std::cin >> n >> c && c == ',')
  7. std::cout << "Value:" << n << "\n";
  8. }
Success #stdin #stdout 0s 3300KB
stdin
1,2,3,4,5,6,
stdout
Value:1
Value:2
Value:3
Value:4
Value:5
Value:6