I got a problem with the following program and dont know where to start to be honest.
write a program where the main function inputs two integers, namely the number of modules passed in 2007 and the number of modules for which the student is registered in 2008. It then calls a function bursary of return type float with these numbers as parameters. The function has to calculate and return the bursary amount. The main function then displays the amount that the student will receive. Repeat the above for 10 students. Use a for loop.
Bursaries are calculated as follows:
1. If the student did not pass any modules in 2007: no bursary
2. If the student passed 1 or 2 modules in 2007 and is registered for at least 1 module in 2008: R300
3. otherwise the bursary is equal to (number of modules passed + number of modules registered for) * 100
You best bet would be to start by writing some pseudo-code. This is a human readable interpretation of how the code will go
e.g
1 2 3 4 5
while (age > 3) then
age = age - 1
calculate illness probability
update array
end while
Your pseudo-code can be as vague or as detailed as your like. The more detail you can include the easier it will be for you to map this C++ afterwards.
Then you can start your code and ask specific questions when they arise. Just remember we are here to answer your C++ questions, not do your homework :)