Student Marking Calculator
Here is how you can improve your code:


Define a class instead of using an array for unrelated numbers (0 to 100 vs. 0.1 or 0.2)
Use a std::vector instead of a fixed size array
Prefer double over float, since it has higher precision
Prefer integer arithmetic over floating point arithmetic, since it won't lead to strange results that easily
Group your global functions into a class, to express that they belong together
Add error checking for all calls to std::cin &gt;&gt; var


By the way, you don't look like a beginner since you


don't import the complete std namespace
use \n instead of std::endl


This is already quite good.