Answer:
Explanation:
The following is written in Java. It continues asking the user for inputs until they enter a -1. Then it saves all the values into an array and calculates the number of values entered, the highest, and lowest, and prints all the variables to the screen. The code was tested and the output can be seen in the attached image below.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
class Brainly {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int count = 0;
int highest, lowest;
ArrayList<Integer> myArr = new ArrayList<>();
while (true) {
System.out.println("Enter a number [0-10] or -1 to exit");
int num = in.nextInt();
if (num != -1) {
if ((num >= 0) && (num <= 10)) {
count+= 1;
myArr.add(num);
} else {
System.out.println("Wrong Value");
}
} else {
break;
}
}
if (myArr.size() > 3) {
highest = myArr.get(0);
lowest = myArr.get(0);
for (int x: myArr) {
if (x > highest) {
highest = x;
}
if (x < lowest) {
lowest = x;
}
}
System.out.println("Number of Elements: " + count);
System.out.println("Highest: " + highest);
System.out.println("Lowest : " + lowest);
} else {
System.out.println("Number of Elements: " + count);
System.out.println("No Highest or Lowest Elements");
}
}
}
Answer:
def fahrenheit_to_celsius(temperature):
c = (temperature - 32) / 1.8
return c
temperature_list = [-10, -5, 0, 10, 20, 32, 40, 50, 60, 75.2]
i = 0
while i < 10:
print(str(temperature_list[i]) + " degrees Fahrenheit = " + str(fahrenheit_to_celsius(temperature_list[i])) + " degrees Celsius")
i += 1
Explanation:
*The code is in Python.
Create a function named fahrenheit_to_celsius that takes one parameter, temperature
Convert the temperature to celsius using the formula
Return the result of the conversion
Create a list holding ten temperatures
Create a while loop that iterates 10 times. Inside the loop, call the function to convert the each temperature in the list and print the result
Answer:
Going green has several other benefits for companies. These include tax credits and incentives, improved efficiency, healthier workplaces, and cost savings – for instance by printing less, turning lights off in unused rooms and refilling ink cartridges. Reusing items also reduces waste from plastic packaging.
Explanation:
Please note that the Problem to be solved from Protocol 1 is not provided hence the general answers. To construct and send, open a network environment a single multi-packet message, simply click "Add Packet" and then click "Send at Once".
<h3>How will the receiver know the order of the packets or if any are missing?</h3>
If the text or message sent does not make any reading sense, or if certain words are jumbled and out of place, then it is clear that something is wrong.
If the messages arrive in a coherent fashion, then the packet was fully received.
<h3>How will the receiver request missed packets and what will the sender do in response?</h3>
Where the users are familiar with the Transmission Control Protocol, lost packets can be detected when there is a timeout. Lost packets are referred to as Dropped packets.
Learn more about Packets at:
brainly.com/question/17777733
Answer:
To delete a question you asked, click the arrow in the top right-hand corner of your question page and select Delete. If any answers have been added to your question, you'll have to request its deletion.Explanation: