Help with output (random spacing problem)

so I'm writing a program that will output a ratio of anything the user types in, and it's all working - the problem is that the output prints with a space before the end, like so: https://gyazo.com/955576b532df870f223c11a8ad06cef9 .. My question is how can I remove that space and fix the output?
1
2
3
4
5
6
7
8
9
10
11
 #include<iostream>
#include<string>
#include<iomanip>

using namespace std;

int main()
{
   
}
//printed final statement, setprecision to 3 decimal points like the example 


edit: solved it, thanks cire!
Last edited on
I'm not sure what "space before the end" means, so I guess and my guess would modify lines 17 and 22.
In the Gyazo I linked where the output goes you can see a space before the beginning(not end, my bad) of the output - instead of "x-to-y" it prints " x-to-y"
getline(cin>>ws, itemOne);

Skip whitespace before extracting the rest of the line.
Topic archived. No new replies allowed.