A ball is thrown vertically upwards with an initial speed of U metres per second. Its height H after time T seconds is given by: H= UT ā€“ 4.9T2 . Write a structured algorithm which requests U and T and prints the height of the ball after T seconds.

there are lots of code snippets online for whatever you wish to do.

All you need is code for display and read, and then just do the calculation and return the result.

Sure! Here's a structured algorithm to solve the problem:

1. Start
2. Initialize variables U, T, and H as floats
3. Display "Enter the initial speed (U) of the ball in meters per second: "
4. Read and assign U
5. Display "Enter the time (T) in seconds: "
6. Read and assign T
7. Calculate H using the formula H = U * T - 4.9 * T^2
8. Display "The height of the ball after ", T, " seconds is ", H, " meters."
9. End

To write a structured algorithm that calculates the height of a ball after a given time, you can follow these steps:

1. Start the algorithm by requesting the user to input the initial speed (U) and time (T).
2. Read and store the values of U and T from the user.
3. Calculate the height (H) of the ball using the formula H = UT - 4.9T^2.
4. Print the calculated height (H) as the output.

Here's the structured algorithm in pseudocode:

```
1. Start
2. Declare variables U, T, H as real numbers
3. Display "Enter the initial speed of the ball (U) in meters per second:"
4. Read U from the user
5. Display "Enter the time (T) in seconds:"
6. Read T from the user
7. Set H = U * T - 4.9 * T^2
8. Display "The height of the ball after T seconds is:", H
9. Stop
```

Note: The algorithm assumes the gravitational acceleration is approximately 9.8 m/sĀ², where -4.9T^2 represents half of the acceleration multiplied by T^2.