+ 2
Java
I want aprogram in java that will generate a bill at mcdonalds for four veg burger(@rs.45 each) and three veg puffs(@rs.25 each ).and discount is rs.50 on the total bill amount.
1 Resposta
0
class mcdonalds{
public int vegburger(int vb){
return vb*45;}
public int vegpuffs(int vp){
return vp*35;}
}
class Main{
public static void main(String args[]){
mcdonalds md=new mcdonalds();
int bill=(md.vegburger(4)+md.vegpuffs(3))-50;
System.out.println("Total bill is:"+bill);
}
}