The Daily Gazette accepts classified ads in several categories. For most ads, the newspaper charges 10 cents per word for the first 50 words, and 8 cents per word for every word after that. Design a flowchart for a program that accepts data about an ad: customer name, ad category (for example, Apartment for rent), and number of words. Display all the input data and the price for the ad.

a. Modify the newspaper ad program to provide a 10 percent discount for ads over 300 words.
b. Modify the newspaper ad program to display the details of the ad only if it is inn the Used cars category.
c. Modify the newspaper ad program so the ad is in the Found category, in which case it is free, or in the Business services category, in which case the charge is 20 cents per word.
d. Modify the newspaper as program to accept the ad data, then to prompt the user for and accept an ad category. Display the data only if the ad is in the specified category.

To design a flowchart for the program, we can follow these steps:

1. Start the program.
2. Prompt the user to enter the customer name, ad category, and number of words.
3. Read and store the input values in variables.
4. Calculate the price for the ad based on the given conditions:
a. If the number of words is less than or equal to 50, the price is 10 cents per word.
b. If the number of words is greater than 50, the price is 10 cents per word for the first 50 words, and 8 cents per word for every word after that.
c. If the number of words is over 300, apply a 10% discount to the calculated price.
d. If the ad category is "Found," the ad is free.
e. If the ad category is "Business services," the price is 20 cents per word.
5. Display the customer name, ad category, number of words, and the calculated price for the ad.
6. End the program.

Here is a flowchart representation of the program:

```
+-----+
|Start|
+-----+
|
v
+----------------+
|Enter customer |
| name, ad |
| category, |
|and number of |
| words |
+----------------+
|
v
+---------+
| Store |
| input |
+---------+
|
v
+-----+
|Price|
+-----+
|
v
+--------------+
|Calculate the |
| price for |
| the ad |
+--------------+
|
v
+--------------+
| Display the |
| customer |
| name, ad |
| category, |
| number of |
| words, and |
| the price |
+--------------+
|
v
+----+
|End |
+----+
```

a. To modify the program for a 10% discount for ads over 300 words, you can add a condition after calculating the price to check if the number of words is greater than 300. If the condition is true, subtract 10% from the calculated price.

b. To modify the program to display ad details only for the "Used cars" category, you can add a condition before displaying the details to check if the ad category is "Used cars." If the condition is true, proceed with displaying the details; otherwise, skip the display step.

c. To modify the program for the "Found" and "Business services" categories, you can add additional conditions before calculating the price. If the ad category is "Found," set the price to 0 (free). If the ad category is "Business services," multiply the number of words by 20 cents to get the price.

d. To modify the program to accept the ad data and prompt the user for a specific ad category, you can add an additional step after storing the input values to prompt the user for the ad category. Read and store the user input for the ad category in a variable. Then, add a condition before displaying the details to check if the ad category matches the specified category. If the condition is true, proceed with displaying the details; otherwise, skip the display step.

I hope this helps! Let me know if you have any further questions.