Programming C

posted by .

//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.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Math

    Can you help me with this problem? At the beginning of January, Lisa had some money in her savings account. Each month she was able to deposit enough from her allowance to double the amount currently in the account. However, she had
  2. Math

    Dalya received the proceeds from an inheritance on April 5. She wants to set aside enough on April 6 so that she will have $17,000 available on October 2 to purchase a car when the new models are introduced. If the current interest …
  3. C programming

    A few questions, all involving "for" loops that I am unsure how to do (Thank you in advance for the help): Q1.) Write a table of conversions from Celsius to Rankin. Allow the user to enter the starting temperature and increment between …
  4. computer

    construct function prototypes for descriptions given below: 1) Rarb() takes no arguments and has no return value. 2) Mains() takes a float argument and returns an int. 3) San() takes two double arguments and returns a double. 4) Sum() …
  5. programming

    creat a logic for a program that continuously prompts the user for a numeric number of dollars until the user enters 0. pass each entered amount to a conversion method that displays breakdown of the passed amount into the fewest bills
  6. Math 10 Linear Equations

    Kevin opened a bank account and plans to deposit $200 each month. Each time he makes a deposit, his parents have agreed to add 50% of the amount the family collects for returning cans and bottles. a) Write an equation that will show …
  7. programming

    Develop psuedocode to control operation of vending machine The ACME Company has approached you with a request to develop the psuedocode that will control the operations of their new series of vending machines. The program will be required …
  8. fundamentals of programming

    The ACME Company has approached you with a request to develop the psuedocode that will control the operations of their new series of vending machines. The program will be required to maintain the product inventory and money reservoir. …
  9. Computer Programming

    Create the flowchart and algorithm for a module that will prompt the user to enter the amount of cash they have in their pocket. The program should output “Not Enough” ($0 - $0.64), “Vending Machine” ($0.65 - $1.99), “Fast …
  10. Java Programming

    I am trying to finish this final problem on my Java homework. Due to a death in the family I've missed a class and now am trying to get back on track. Write a driver class called GasPumpDriver that meets the following specifications: …

More Similar Questions