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
display personal info using cin
Write a C++ program creating a class for workers mentioning their id, name and group to which they belong. Compute their weekly wages for the number of hours they work, fixing a nominal pay rate which is a sensitive data. Include the required Accessor and mutator member functions to set and display the wages.
Command Line Argument - Count
Write a program to accept strings as command-line arguments and print the number of arguments entered.
Sample Input (Command Line Argument) 1:
Command Arguments
Sample Output 1:
Arguments :
Command
Arguments
The number of arguments is 2
Sample Input (Command Line Argument) 2:
Commands
Sample Output 2:
Arguments :
Commands
The number of arguments is 1