3
Mookin 3 150.4 c
75 i
2 f
151 c
Kimkin 2 67.3 i
204.5 c
1000 c
Lumkin 5 43.1 i
12 i
44 i
25 i
35 i
60 i
I also have a completely commented version if that would help people to understand it better. I can post the assignment itself too. This is my first post, so if i didn't format something correctly please let me know so i can fix it and know for future posts.
Thank you in advance,
Karl-Heinz
line 32, I prefer to use getline(cin, str...) instead of just cin because it sometimes acts wonky.
Other than that, the only other thing that is really not a big deal, but I will go ahead and point it out is using zero as starting point in for-loops instead of 1. Like I said it is not a big deal, but if you are working with arrays and storing values in memory, the first memory address is zero and so if you start at 1, you might miss something or in some cases run into a segmentation fault.
Your height_conversion function doesn't return anything - that ought to have attracted a warning from the compiler. Make sure you have all the warnings turned on in your compiler.
I use gcc with -Wall -Wextra -pedantic
I could even use -Werror which promotes warnings to errors.
Also, always put a default clause in your switch - this will allow you to handle any bad input.
As Smac89 was saying, the idiom for doing something n times is: