#include <iostream>
#include <iomanip>
#include <limits>
using namespace std;
int main() {
int i2 = 0;
double d2 = 0.0;
string s2;
cin >> i2;
cin >> d2;
getline(cin, s2);
cout << "Integer = " << i2 << endl;
cout << "Double = " << d2 << endl;
cout << "String = " << s2 << endl;
}
I'm trying to give sample input as:
12
3.4
Coding
Expected output:
Integer = 12
Double = 3.4
String = Coding
Actual output
Integer = 12
Double = 3.4
String =
As shown in the above actual output, after feeding the first two inputs from above and the moment the enter is pressed, it's not accepting the next input that I would like to give.