Programming C

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

return 1;
return 0;

Or at least can someone tell me steps on how I could make this work.

  1. 👍 0
  2. 👎 0
  3. 👁 136

Respond to this Question

First Name

Your Response

Similar Questions

  1. Calculus Help Please

    let f(x)=(x-1)^2, g(x)=e^(-2x), and h(x)=1+ ln(1-2x) find linearization of f, g, and h at a=0 Lf(x)= Lg(x)= Lh(x)= graph f,g, and h, and their linear app. For which function is the linear app. best? for which is the worst?

    asked by Ahmed on April 2, 2014
  2. Precalc growth and decay

    Alison deposits $500 into a new savings account that earns 5 percent interest compounded annually. If Alison makes no additional deposits or withdrawals, how many years will it take for the amount in the account to double? the

    asked by Kerrie on April 19, 2009
  3. Social studies

    1. What event would most likely cause an increase in sales A. Decrease in price B. Increase in supply C. Decrease in product quality D. Increase in quality product Answer: A 2. What is stated by the law of supply A. An increase in

    asked by HELPPPPP SOCIAL on April 12, 2017
  4. programming

    3. Write a structured algorithm that prompts the user to input the name and the price of an item and the quantity purchased. It should print the name, price, quantity and amount due with appropriate labels.

    asked by alethia benney on October 16, 2012
  5. intro to computer programming

    Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount. Your program should use a

    asked by Anonymous on October 26, 2015
  1. statistics

    A source in the Internal Revenue Service has stated that historically 90% of federal tax returns filed are free of arithmetic errors. A random sample of 25 returns are selected and checked carefully for arithmetic errors. Assuming

    asked by Sarah on August 30, 2012
  2. math

    Mr chen deposits a certain amount in a bank if the interest of the bank decreased from 3.75% to 3.5% per annum mr chen's interest decrease by 50$ in a year find the sum of amount he deposits

    asked by Anonymous on May 22, 2014
  3. Finance

    Solution needed . You need to have $50000 at the end of 10 years .To accumulate this sum, you have decided to save a certain amount at the end of each of the next 10 years and deposits it in the bank. the bank pays 8 percent

    asked by Tamanna on August 19, 2016
  4. Online behavior

    sorry my friend went to far but yeah we well never say bad language on this app again and we wont be rude and behave better and not come on this app again please forgive us never again but its okay

    asked by zack on January 15, 2020
  5. Programming Logic and Design (help?)

    Design a retirement planning calculator for Skulling Fincancial Services. Allo a user to enter a number of working years remaining in the user's career and the annual amount of money the user can save. Assume that the user earns

    asked by Aubrey on March 1, 2018
  6. Economics

    The table shows the amounts held as the various components of M1 and M2. Calculate the value of M1 and M2. The value of M1 is ​$nothingm billion. The value of M2 is ​$nothingm billion. Item ​$billions Savings deposits 300300

    asked by UB on November 12, 2018

You can view more similar questions or ask a new question.