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