If and Else statements.

I have a problem. I need to write a program that gives me the final price of a watch after the taxes have been added and discounts subtracted. There are a total of 3 watches each with different prices. I need to use if and else statements so I can obtain a desired output depending on the watch I chose. My problem is structuring the code. My professor does little to explain I was hoping someone could assist me. It's very difficult to explain without showing the actual code.

It's very difficult to explain without showing the actual code.


So why not show us the code? Afraid we'll steal it? ;P
What i got from ur explanation is this:

you need to calculate final price of clock in case you care given with the initial price(without taxes and discount).

You need not to write it using if-else
just make a function and pass the initial price of the watch as an argument and the function will return u the final price.
the function may be called any number of times with different initial price


Cheers........
Do I just copy paste it in here? It's a little big. When I copy paste it it get all jumbled and weird. I see other people minimize it to fit the page. How?
why u require if else statements ....u just need to make a function and deduct tax and discount to get job done.....as per ur question statement
My thoughts exactly but the professor requires me to use them.
i think ur professor wants something else rather than simple calculation.....

just explain ur problem in details....
how can people here helped you when you haven't post your code's. actually if and else statement are just conditional statements. you can used this easily as long as you understand the used of this statement. for you to learn see more sample programs from online tutors or even in here.
Topic archived. No new replies allowed.