Add newline on EOF

This commit is contained in:
augustin64 2024-01-18 12:00:34 +01:00
parent fed70c7987
commit 503710ad88
5 changed files with 8 additions and 4 deletions

View File

@ -14,4 +14,4 @@ else {
}; };
result = prev1+prev2; result = prev1+prev2;
} }
result;; result;

View File

@ -5,4 +5,4 @@ int fibo(int n) {
return fibo(n - 1) + fibo(n - 2); return fibo(n - 1) + fibo(n - 2);
} }
} }
fibo(15);; fibo(15);

View File

@ -18,4 +18,4 @@ int max_prime(int limit) {
return prime; return prime;
} }
max_prime(250);; max_prime(250);

View File

@ -10,4 +10,4 @@ int main(int x) {
return function2(x, 2*x+3)*12; return function2(x, 2*x+3)*12;
} }
main(3);; main(3);

View File

@ -41,6 +41,10 @@ string get_line_with_hist(vector<string> history, int line_num, bool &received_e
if (ch == 4 || ch == EOF) { // 4 is End Of Transmission which can also be received if (ch == 4 || ch == EOF) { // 4 is End Of Transmission which can also be received
received_eof = true; received_eof = true;
if (input.size() > 0)
cout << endl;
return input; return input;
} }