Answer:
Explanation:
The following program is written in Java. It asks the user for the two inputs and then uses those inputs in a for loop. The loop goes through each number checking to see if it is even or odd. If it is even it prints out Even: and the number after multiplying it by 3. If it is odd it prints out Odd: and the number after adding 10 to it. The output can be seen in the attached picture below.
import java.util.Scanner;
class Brainly {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter number 1: ");
int num1 = in.nextInt();
System.out.println("Enter number 2:");
int num2 = in.nextInt();
for (int x = num1; x <= num2; x++) {
if ((x % 2) == 0) {
System.out.println("Even: " + (x*3));
} else {
System.out.println("Odd: " + (x+10));
}
}
}
}
Answer: Authorization process
Explanation
Authorization is a security measure to determine the access levels or user/client rights to use to system resources like files, computer programs, data and other features on a computer. Authorization process is the process of granting or denying access to a network resource that allows the user access to various resources based on the his/her identity.
Most web security systems are based on a two-step Authorization process. The first step ensures and approves the user's identity, that is authentication and the second stage is authorization, which allows the user to access the various resources based on the user's identity.
Therefore the first thing you should do when you suspect "illicit use of, or threats to, computer resources and sensitive information is a strong authentication and authorization process".
Answer:
void mn(int m, int n){
int sum = 0;
int count = 0;
if(m<n){
for(int i = m;i<=n;i++){
sum+=i;
}
}
else{
for(int i = n;i<=m;i++){
sum+=i;
}
}
count = abs(m - n)+1;
cout<<"Sum: "<<sum<<endl;
cout<<"Average: "<<(float)sum/count;
}
Explanation:
This line defines the method
void mn(int m, int n){
This initializes sum and count to 0
int sum = 0;
int count = 0;
This checks if m is less than n
if(m<n){
This iterates from m to n and calculates the sum of numbers between this interval
<em> for(int i = m;i<=n;i++){</em>
<em> sum+=i;</em>
<em> }</em>
<em> }</em>
If otherwise,
else{
This iterates from n to m and calculates the sum of numbers between this interval
<em> for(int i = n;i<=m;i++){</em>
<em> sum+=i;</em>
<em> }</em>
<em> }</em>
This calculates the range from m to n using absolute function
count = abs(m - n)+1;
This prints the calculated sum
cout<<"Sum: "<<sum<<endl;
This calculates and prints the average
cout<<"Average: "<<(float)sum/count;
}
<em>See attachment for complete program that includes the main (in c++)</em>