Monday
April 21, 2014

Homework Help: Programming C

Posted by Anonymous on Thursday, October 18, 2012 at 12:03pm.

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

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

programming - creat a logic for a program that continuously prompts the user for...
programming - Create the logic for a program that continuously prompts the user ...
Programming Logic and Design: Comprehensive, 6th E - Create the logic for a ...
Computer programming - Sorting is a common operation used in programming. ...
Programming in c++ - Write a program in c++ that inputs a number [1-12] from the...
programming - 4. Write a structured algorithm to prompt the user to enter the ...
programming - write a payroll program that promt a user to enter his name,hourly...
programming - Write a C++ code to count the number of characters, words, and ...
Programming - Design a program that calculates the total amount of a meal ...
Programming - Language - PYTHON Design a program that calculates the total ...

Search
Members