Write a pseudocode and algorithm that to else the user to input 10 numbers in program we display the largest number

assuming positive numbers,

largest=0
for i=1 to 10
read val
if (val > largest) largest=val
end for
print largest

so, what change is needed if positive and negative numbers are allowed?

_0123456789

Pseudocode:

1. Initialize a variable `largest_number` to 0.
2. Initialize a loop counter `count` to 1.
3. Begin a loop that runs until `count` is equal to or greater than 10.
a. Prompt the user to input a number and store it in a variable `number`.
b. If `number` is greater than `largest_number`, update `largest_number` to `number`.
c. Increment `count` by 1.
4. Display `largest_number` as the result.

Algorithm:

1. Set `largest_number` to 0.
2. Set `count` to 1.
3. Start a loop until `count` is equal to or larger than 10.
a. Ask the user for a number and store it in `number`.
b. If `number` is greater than `largest_number`, update `largest_number` to `number`.
c. Increase `count` by 1.
4. Output `largest_number` as the result.

Sure! Here's a pseudocode and algorithm that prompts the user to input 10 numbers, and then displays the largest number among them:

Pseudocode:
```
1. Initialize a variable "largest" to 0
2. Initialize a variable "count" to 1
3. Repeat steps 4-5, 10 times (i.e., until count reaches 10)
4. Read a number from the user and store it in a variable "num"
5. If "num" is greater than "largest", update "largest" with the value of "num"
6. Display the value of "largest"
```

Algorithm:
```
1. Set "largest" to 0
2. Set "count" to 1
3. Repeat steps 4-5, 10 times (i.e., until count reaches 10)
4. Ask the user to enter a number and store it in "num"
5. If "num" is greater than "largest", set "largest" to the value of "num"
6. Display the value of "largest"
```

To execute this pseudocode or algorithm in a programming language, you would need to choose a specific programming language and translate the pseudocode or algorithm into its syntax. The algorithm provided above can be implemented in various programming languages like Python, Java, C++, etc. Here's an example implementation in Python:

```python
largest = 0
for count in range(1, 11):
num = int(input("Enter a number: "))
if num > largest:
largest = num
print("The largest number is:", largest)
```

In this Python implementation, the user is prompted to enter 10 numbers one by one using the `input` function, and the `if` statement checks if the entered number is greater than the current largest number. If it is, the largest number is updated. Finally, the result is displayed using the `print` function.