Answer:
B
Explanation:
It adds the same number over and over again, 'number' times.
This is number*number, a.k.a. number². (squared)
age is a suitable variable name. It's descriptive and concise. Make sure it's lowercase.
import java.util.Scanner;
public class JavaApplication33 {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int total = 0;
System.out.println("Enter positive numbers (-1 to stop)");
while (true){
int num = scan.nextInt();
if (num == -1){
break;
}
else{
total += num;
}
}
System.out.println("Sum is "+total);
}
}
I hope this helps!
Answer:
Principle of least privilege
Explanation:
The principle of least privilege means the user has only access to that data which is required to complete the task
Therefore as per the given situation, Joe who is an emloyee wants to access the client data base but later on he needs to access the payroll data base
So as per the given situation, the first option should be violated
Hence, the same is to be considered