You should now have a complete working program that converts a given temperature from Fahrenheit to Celsius and vice versa, depending on which option (integer) the user enters.
Revise your temperature converter to use a switch statement. The switch should test a char variable holding the characters entered by the user, e.g: Enter "f" to convert from Fahrenheit to Celsius Enter "c" to convert from Celsius to Fahrenheit
You should provide an appropriate default statement.
Write a program for an automatic fuel filling service. The program should ask the user for the fuel type using a char (e.g. 'p' for petrol or 'd' for diesel) and the number of litres needed (int), and finally display the price of the charge.
The program should have the following constraints:
It should be case sensitive to user input, e.g. "P" and "p" are treated equivalently.
The program should only display the price if a valid fuel type has been entered and fuel is actually needed!
You can only use one if-statement and one switch statement.
If you haven't already, demonstrate how the two statements can be nested without impacting the solution.
Write a program for an automatic fuel filling service. The program should ask the user for the fuel type using a char (e.g. 'p' for petrol or 'd' for diesel) and the number of litres needed (int), and finally display the price of the charge.
The program should have the following constraints:
It should be case sensitive to user input, e.g. "P" and "p" are treated equivalently.
The program should only display the price if a valid fuel type has been entered and fuel is actually needed!
You can only use one if-statement and one switch statement.
If you haven't already, demonstrate how the two statements can be nested without impacting the solution.
write a java program to display a three-month delivery report for three different years , using two dimensional array
Design an interface and write a program that will accept an integer and output what is entered