Ske algo lab/read input
- This is part of Ske algo lab.
Detecting EOF for cin
This is the template for 3n+1.
Detecting EOF for getline
You can use std::getline to read the whole line. The following is the template for TEX quotes.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string st;
while(getline(cin, st)) {
// ...
}
}