use a modular approach and pseudo- code to design a suitable program to solve it.
Allow the user to enter a series of temperatures in degrees Celsius (C) termi- nated by the input of −999. For each one, find the corresponding tempera- ture in degrees Fahrenheit (F). The conversion formula is:
F = 9 * C/5 + 32.
77c
To design a suitable program to solve this problem, we can use a modular approach. This means breaking down the problem into smaller, manageable functions. Here's a pseudocode example:
```
# Function to convert Celsius to Fahrenheit
function celsius_to_fahrenheit(celsius):
fahrenheit = 9 * celsius / 5 + 32
return fahrenheit
# Main program
function main():
temperatures = []
# Loop to get user input until -999 is entered
while True:
input_temp = input("Enter a temperature in degrees Celsius (-999 to quit): ")
# Check if input is -999 to terminate the loop
if input_temp == "-999":
break
# Convert input from string to float
celsius = float(input_temp)
# Call celsius_to_fahrenheit function to convert Celsius to Fahrenheit
fahrenheit = celsius_to_fahrenheit(celsius)
# Add converted Fahrenheit temperature to the list
temperatures.append(fahrenheit)
# Print the converted temperatures
print("Converted temperatures in degrees Fahrenheit:")
for temp in temperatures:
print(temp)
# Call the main function to start the program
main()
```
In this pseudocode, we have defined two functions:
1. `celsius_to_fahrenheit`: This function takes a temperature in Celsius as input and converts it to Fahrenheit using the conversion formula F = 9 * C/5 + 32. It returns the converted temperature in Fahrenheit.
2. `main`: This is the main function that runs the program. It initializes an empty list `temperatures` to store the converted Fahrenheit temperatures. It then prompts the user to enter temperatures in degrees Celsius until they enter -999. Each input temperature is converted to Fahrenheit using the `celsius_to_fahrenheit` function and appended to the `temperatures` list. Finally, the converted temperatures are printed.
To implement this pseudocode in a programming language, you would need to choose a suitable language (such as Python, Java, or C++) and convert the pseudocode into the syntax and conventions of that language.