Question: Wite a program in ADA In particular, you are feeding these family members: Alyssa is a vegetarian; she will not eat any dish containing meat.

Wite a program in ADA

In particular, you are feeding these family members:

Alyssa is a vegetarian; she will not eat any dish containing meat. Clara hates vegetables; she will not eat any dish containing vegetables. Daniel will eat only organic food. Elena will not eat any desserts. Isaiah, who is lactose-intolerant, will not eat any food containing dairy products. Justin is allergic to peanuts and will not eat any food containing them.

A meal is a list of dishes. Each dish will be specified as a list of six numbers:

[Dish_number, Has_meat?, Has_vegetables?, Organic?, Is_dessert?, Has_dairy?, Has_peanuts?]

The first number, a positive integer between 1 and 100, serves as the name of the dish. The remaining numbers in the list are either 1 or 0, indicating whether the dish has a particular property; 1 indicates that the dish has that property, and 0 indicates that it does not.

Write an "ADA" program to solve the problem described above.

The input will contain an integer N on a line by itself, representing the number of dishes in the meal. This is followed by N lines, each containing 6 integers: a dish number, followed by 5 numbers (1 or 0) indicating whether the dish contains meat, contains vegetables, is organic, is a dessert, and contains dairy.

The output will be one of two messages: "Satisfactory meal" or "Unsatisfactory meal".

FOR EXAMPLE

Input:

 5 8 1 0 1 0 0 0 9 0 1 1 0 0 0 23 0 0 1 0 0 0 2 0 0 1 1 0 0 6 0 0 1 1 1 1 

Output:

 Satisfactory meal 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!