Hi all I have written a program to issue a bursary according to the amount of modules passed in 2007 and the amount registered for in 2008 , basically
if the student did not pass any modules in 2007 :no bursary
if the student passed 1 or 2 modules in 2007 and is registered for atleast 1 module in 2008 the bursary will be R300.
otherwise the bursary is equal to the number of modules passed in 2007 + the number of modules registered in 2008 times 100.
but my code keeps returning 300 , can anyone help?
CODE: [ //Program calculating Bursarys.
using namespace std;
float bursary(int noModsPassed07 ,int noModsReg08)
if (noModsPassed07 = 0)
if (noModsPassed07 >0 && noModsPassed07 <= 2 && noModsReg08 >= 1)
return (noModsPassed07 + noModsReg08 * 100);
int noModsPassed07, noModsReg08;
cout << "Enter number of modules passed in 07 followed by the number registered in 08 ";
cin >> noModsPassed07;
cin >> noModsReg08;
burs = bursary(noModsPassed07, noModsReg08);
cout << "With " << noModsPassed07 << " modules passed in 2007 and " << noModsReg08 << " modules registered in 2008 , you get a bursary of R" << burs << endl;