General Basic Doubt in Concept

Here is the link:- https://ide.codingblocks.com/s/409394, to code where I am having a doubt. Please explain me the following things :-

  1. If I am giving input of a string after employee id input, in the same line, then it is taking the input, If not then it is taking blonk as inpu. And ok to resolve that blank issue, I used cin.get(), still no change in the taking input through next line.
  2. In float data type variable, cin either takes the input as integer part or rounds off the number. So, how to take input as in real numbers?

Please explain these.

There is a space after 24 which is going in cin.get() instead of \n

Its not rounding input but rounding when u are outputting
so use this to output

cout << "Salary of the Employee : " << fixed<<setprecision(4)<<salary << endl;

Also header for this is <iomanip>

what does that do. Please explain?

I believe u meant this

Its used to show the number upto mentioned decimal places . 4 in this case

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.