espanol;
Escriba una declaración if-else que asigne 0 a la variable b si la variable a es menor que 10. De lo contrario, debería asignar 99 a la variable b
<h3>respuesta:</h3><h3><u>Una declaración if le dice al programa que ejecute un bloque de código, si una condición es verdadera. En el siguiente código, escribimos un mensaje solo si x es mayor que 0:</u></h3><h3><u>var x = 5;</u></h3><h3><u /></h3><h3><u>if (x > 0) {</u></h3><h3><u> text('¡x es un número positivo!', 200, 200);</u></h3><h3><u>}</u></h3>
ingles;
Write an if-else statement that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b .
<h3> answer:</h3><h3 /><h3>An if statement tells the program to execute a block of code, if a condition is true. In the following code, we write a message only if x is greater than 0:</h3><h3>var x = 5;</h3><h3 /><h3>if (x> 0) {</h3><h3> text ('x is a positive number!', 200, 200);</h3><h3>}</h3><h3 /><h3 /><h3>xd </h3>
Answer:
import java.util.Arrays;
import java.util.Scanner;
public class num1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter length of the array:");
int len = in.nextInt();
double [] temps = new double[len];
double avgTem;
int k =0;
double total = 0;
for( k=0; k<temps.length; k++){
System.out.println("Enter values for the array");
temps[k]=in.nextDouble();
}
System.out.println("The Arrays contains the following values");
System.out.println(Arrays.toString(temps));
// Computing the average of the values
for(k=0; k<temps.length; k++){
total = total+temps[k];
}
avgTem = total/(temps.length);
System.out.println("The average Temperature is: "+avgTem);
}
}
Explanation:
- Using Java programming language
- Import the Scanner class to receive user input
- Prompt User for the length of the Array, receive and store in a variable len;
- Declare a new double array of size len double [] temps = new double[len];
- Using a for loop, continually prompt user to enter values into the array
- Display the values of the array using Java's Arrays.toString method
- Use another for loop to add up all the elements in the arraay and store in the variable called total
- Outside the second for loop calculate the average avgTem = total/(temps.length);
- Display the average temp.
the answer is A typewritten form of communication with all parts aligned to the left margin
Answer:
5/ 18
Explanation:
Given :
List A: [20,10,20]
List B: [40,10,30,20,40,30]
Chance that number drawn from list A is larger than or equal to that drawn dlfrom list B.
If:
A = 20
B ≤ 20 : [10,20] = 2
A = 10
B ≤ 10 : [10] = 1
A = 20
B ≤ 20 : [10,20] = 2
Probability = Required outcome / Total possible outcomes
Hence,
required outcome = (2 + 2 +1) = 5
Total possible outcomes = 3C1 * 6C1 = (3 * 6) = 18
Hence,
chance that the number we drew from list A is larger than or equal to the number we drew from list B
= 5 / 18
Answer:
Wireless networks
Explanation:
Wireless networks provide more configuration flexibility and are less expensive. Companies that add employees will greatly benefit from the flexibility of wireless connections. Workstations can be moved with ease without the effort and cost required to run wires and cables. It is the best for network expansion since companies can add users quickly and grow their networks cost-effectively.