Asked by Anonymous
//compares the amount the user has in deposits to the price of app selected.
//It returns 1 if the amount is enough to cover the cost, 0 if there is not enough.
int Compare(double deposit, double choiceCost);
how do you get this function to compare return 1 or 0?
i have double balance = 0.0; declared already and previously used *depositPtr as well as *choiceCostPtr.
????????????????
if(balance>=choiceCost)
{
return 1;
}
else
{
return 0;
}
Or at least can someone tell me steps on how I could make this work.
//It returns 1 if the amount is enough to cover the cost, 0 if there is not enough.
int Compare(double deposit, double choiceCost);
how do you get this function to compare return 1 or 0?
i have double balance = 0.0; declared already and previously used *depositPtr as well as *choiceCostPtr.
????????????????
if(balance>=choiceCost)
{
return 1;
}
else
{
return 0;
}
Or at least can someone tell me steps on how I could make this work.
Answers
There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.