Question: correct answer for c + + : Which of the following is an example of a recursive function? Group of answer choices MySalaryCalculator ( tempSal

correct answer for c++: Which of the following is an example of a recursive function?
Group of answer choices
MySalaryCalculator(tempSal){
if (tempSal <=500)
return -1
else
tempSal = tempSal +1000
}
MySalaryCalulator(tempSal){
if (tempSal <=500)
return -1
else
MySalaryCalculator(tempSal -500)
}
MySalaryCalculator(tempSal){
if (tempSal <=500)
return -1
else
print(tempSal)
}
MySalaryCalculator(tempSal){
if (tempSal >=500)
return -1
else
tempSal = tempSal +1000
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!