The Romance World Cruise Line provides special gifts and celebrations for passengers who are newlyweds, as well as for those who have been married more than 40 years. Design a flowchart and pseudocode for a program that accepts a couple's last name, ship cabin number, and number of years married. Display a couple's data with the message "Newlywed Gift" if the couple has been married one year or less, "Deluxe Anniversary Package" if the couple has been married 40 years or more, and no message if the couple has been married between 2 and 39 years inclusive.


Can Someone help please?

The Romance World Cruise Line provides special gifts and celebrations for passengers who are newlyweds, as well as for those who have been married more than 40 years. Design a flowchart and pseudocode for a program that accepts a couple's last name, ship cabin number, and number of years married. Display a couple's data with the message "Newlywed Gift" if the couple has been married one year or less, "Deluxe Anniversary Package" if the couple has been married 40 years or more, and no message if the couple has been married between 2 and 39 years inclusive.

Of course! I can help you design a flowchart and pseudocode for the program you described.

First, I'll explain the logic of the program. To determine which message to display based on the number of years married, we can use a series of conditions. If the couple has been married one year or less, we display the "Newlywed Gift" message. If the couple has been married 40 years or more, we display the "Deluxe Anniversary Package" message. If the couple has been married between 2 and 39 years inclusive, we display no message.

Now, let's start by designing the pseudocode for this program:

```
1. Start
2. Read last name, cabin number, and number of years married from the user
3. If number of years married <= 1:
- Display "Newlywed Gift"
Else if number of years married >= 40:
- Display "Deluxe Anniversary Package"
Else:
- Display no message
4. Stop
```

Next, let's create a flowchart based on this logic. In the flowchart, we will use decision diamonds for the condition checks and rectangles for the input/output steps.

```
+-------------------+
| Start |
+-------------------+
| |
| Read last name, |
| cabin number, and |
| number of years |
| married |
| |
+---------+---------+
|
v
+---------+---------+
| Number of |
| years married |
| <= 1? |
+---------+---------+
|
+---+---+
| |
| Yes |
| |
+---+---+
|
v
+---------+---------+
| Display "Newlywed|
| Gift" |
+---------+---------+
|
v
+---------+---------+
| Number of |
| years married |
| >= 40? |
+---------+---------+
|
+---+---+
| |
| Yes |
| |
+---+---+
|
v
+---------+---------+
| Display "Deluxe |
| Anniversary |
| Package" |
+---------+---------+
|
v
+---------+---------+
| Display no |
| message |
+---------+---------+
|
v
+-------------------+
| Stop |
+-------------------+
```

I hope this helps you visualize and understand the program's flow! Let me know if you have any further questions.