Computer Science, asked by pavithrao2, 11 months ago

write a program that displays the following menu for the food items avilable to take order from the customer B=burger ;charge=Rs.80 F=frenchfries ;charge =Rs.120 P=pizza ;charge=Rs.500 S=sandwich; charge =RS.100 the type of food and quality should be given as input.the program should allow the customer to buy food items repeatedly any number of times and print the total bill​; using switch case statement

Answers

Answered by Aryan123Agrawal
0

Explanation:

import java.util.*;

class abc

{

public static void main ()

{

Scanner sc = new Scanner(System.in);

System.out.println("enter b for burger ,f for French fries ,p for pizza ,s for sandwiches");

char a = sc.nextcharAt(0);

if (a='b'||a='B')

System.out.println("RS 80");

if(a='F'||a='f')

System.out.println("RS 120");

if(a='P'||a='p')

System.out.println("RS 500");

if(a='S'||a='s')

System.out.println("RS 100");

}

}

Similar questions