Answer:
The code to this question as follows:
Code:
if(x < y) //if block that check value of x less then value of y
{
if(x<z) // inner if block that check value of x less then value of z
{
min = x; //assign value of x in min variable
}
else // inner else block when condition is false
{
min = z; //assign value of z in min variable
}
}
else //outer else block
{
if(y<z) //if block to check value of variable y is less then value of z
{
min = y; //assign value of y in min variable
}
else //else block
{
min = z; //assign value of z in min variable
}
}
Explanation:
In the given question it is defined, that an integer variable " x, y,z, and min" is declared, in which variable "x,y, and z" value is defined, and the variable is used to assign a big value.
- To check the biggest value we use the if-else statement in which, and if block check value of x is less than then the value of y if this condition is true so, inside this another if block declares, that will check if the value of x is less then z. if this is true, it will assign the value of x in min variable else it will assign the value of z in min.
- In the outer else part, another conditional block has used, that checks if the value of y is less than then the value of z if it is true, it assigns the value of y in min else it will assign the value of z in min.
Answer:
SQL injection
Explanation:
SQL injection is a vulnerability in databases that occurs when user input is not properly validated. Hackers are able to input SQL query statements to bypass the use of the actual user name and password to gain access to the account.
Using placeholders in programmed SQL statements mitigates the effects of SQL injection.
un conjunto de cosas que trabajan juntas como partes de un mecanismo o una red de interconexión x - cloudie
Answer:
import java.util.Scanner;
public class num9 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter three numbers between 0 and 100");
double num1 = in.nextDouble();
double num2 = in.nextDouble();
double num3 = in.nextDouble();
double min = 0;
double sMin = 0;
double tMin = 0;
if(num1<num2 && num1<num3){
min = num1;
sMin = num2;
tMin = num3;
}
else if(num2<num1 && num2<num3){
min = num2;
sMin = num1;
tMin = num3;
}
else if(num3<num2 && num3<num1){
min = num3;
sMin = num1;
tMin = num2;
}
double average = (sMin+tMin)/2;
System.out.printf("The average of the two highest scores is:%.1f \n",average);
}
}
Explanation:
- Using Java programming language. The Scanner class is used to receive the three numbers. The user is prompted to enter a valid number between 0 and 100.
- Using three IF statements the minimum (min), second largerst (sMin) and the largest (tMin) of the three numbers is determined.
- the average of the sMin and tMin is calculated and printed to the console with the printf method to one decimal place.
Try to say something yourself, but if you are too scared, get an adult involved. The one bad thing you could do is ignore it.