i need help

can anyone tell me how to write function that has following specifcations.
search for a house that has some price and the price is not more then a specified amount.i just need logice.plz tell me

if( price < specified_amount )
??
Is this what you are looking for you said logic but it's a pretty easy logic since you already said a < b...
Lets assume that the houses in question are objects. Also that you have a list of these objects available. You can create a 'for loop' that checks each house one at a time and then displays the house name if the cost of house is less than an entered ammount.
maybe
1
2
3
4
5
6
7
8
9
10
void find_price(int price){

//if price is less or equal to  specifiedAmount
//::then
//switch statement
//else
//error message

}//end function find_price
Topic archived. No new replies allowed.