I am new to programming and chose C++ as a starting language. I am creating a program (for practice). I want the user to enter 5 numbers that are a combination of integers and decimals. How would I round decimals < .50 down to the nearest integer and decimals that are >= .50 to round up. I do not want to truncate because that will always round down. I think I need to declare variables a, b, c, d, e. Do I need an if/else statement to round up and down?
Eventually I will add and divide the 5 integers to find the median, but I should be able to figure that out on my own.
I apologize for such an amateur question but I just wrote my first programs yesterday.
Is C++ a good language for a beginner?
Thank you in advance.