Computer Science, asked by ashkhan78, 1 year ago

how to write this program ?​

Attachments:

Answers

Answered by gopspku
1

serve=0;

budget=2000

SOP("Enter the no of peoples attending the meeting")

int no = in.nextint();

int cost1= no*40;

int remain=2000-cost1;

notea=remain/25;

teaS=notea-no;

while(teaS>=0)

{

serve=serve+1;

teaS=teaS-30;

}

System.out.println("no of times tea served ="+serve);

IF HELPS..

PLZ MAKE ME BRAINIEST

Answered by guptaumang736
0
Answer:
A python program for this is
budget = 2000
cost_per_person = 40
cost_per_tea = 15

# calculate the maximum number of participants
max_participants = budget // cost_per_person

# calculate the maximum number of times tea could be served
max_tea_servings = min(max_participants, budget // cost_per_tea)

# print the report
print("Budget for the meeting: Rs.", budget)
print("Cost per person: Rs.", cost_per_person)
print("Cost per tea serving: Rs.", cost_per_tea)
print("Maximum number of participants: ", max_participants)
print("Maximum number of times tea could be served: ", max_tea_servings)


Similar questions