Apparently this was originally posted in the wrong area :rolleyes: :rolleyes:

Anyway.... bit of a cheek I know but if you're feeling ultra generous with your knowledge but can anyone write some code in C using if statements for the following:

"A car costs a certain amount. If it is silver there is an extra charge of £300. If it is an XL model there is an extra charge of £500.

The code needs to enter the basic price of the car. Ask if it is silver and add the extra charge if appropriate. Then ask if it is an XL model and add this extra charge if appropriate. Finally display the total price."


And if you're feeling uber generous... :cheesy: :cheesy:

"A man has estabished the following set of rules for deciding what clothing to wear to enable him to walk to work comfortably in all weathers in the Spring:

- if the barometer indicates storm he wears his overcoat and hat
- if the barometer indicates rain he wears his raincoat and takes an umbrella
- if the barometer indicates change he bahaves as for fair if it rained yesterday and as for rain if it did not
- if fair is indicated he wears light over-jacket and takes an umbrella
- if very dry is indicated he wears light over-jacket

The code needs to input a coded barometer reading and whether it rained yesterday (where necessary), and the type of clothing he should wear."

Cheers!
:cool:

>>but can anyone write some code in C using if statements for the following:


No! write it yourself, post code and ask questions. we do not do your work for you.

There's really no need to be horrid. :confused:

Heh, dont mind him, it was just a fatherly nudge..:D
After all he is the MOD you know

Anyways please post the code which you have written and we will help you out.

There's really no need to be horrid. :confused:

apparently there is since you have the nurve to beg everyone to do your work for you. Please read the forum rules posted at the top of this board.

This question has already been answered. Start a new discussion instead.