fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. int i;
  7. float f;
  8. string s;
  9. cin >> i >> f >> s;
  10. cout << "read 1 int: " << i << endl;
  11. cout << "read 1 float: " << f << endl;
  12. cout << "read 1 string: " << s << endl;
  13. getline(cin,s);
  14. cout << "read 1 line: " << s << endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 3476KB
stdin
123
123.456
everybody loves ice cream
stdout
read 1 int: 123
read 1 float: 123.456
read 1 string: everybody
read 1 line:  loves ice cream