Explanation:
The said action sof removing cflynn from HR group and keeping in other can be done by following;
First open the command prompt, type user group name of cflynn. Upon pressing enter a list of all group in which cflynn belongs would be displayed.
We see that Cflynn belong sto mgmt1 group
Now to change its status in this group; Type usermod -G mgmt1,it cflynn and press Enter to take out cflynn from this group
To keep him in other groups, type the usermod -G command enlisting all groups to which cflynn must belong.
Answer:
import java.util.Scanner;
public class num1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter User name 1 and 2");
int userNum1 = in.nextInt();
int userNum2= in.nextInt();
if(userNum1<0){
System.out.println("userNum1 is negative.");
}
else if(userNum2>8){
userNum2 =0;
}
else{
System.out.println("userNum2 is less than or equal to 8..");
}
}
}
Explanation:
This is implemented in Java programming language
Using the scanner class, the user is prompted to enter two numbers
These are saved in the variable userNum1 and userNum2 respectively.
If, else if and else statements are then used according to the specifications given in the question.
Answer:
<em>This program is written in python programming language.</em>
<em>The program is self explanatory; hence, no comments was used; However, see explanation section for line by line explanation.</em>
<em>Program starts here</em>
length = float(input("Length of small cube: "))
volume = 27 * length**3
print("Volume: "+(str(volume)))
Explanation:
The first line of the program prompts the user for the length of the small cube;
length = float(input("Length of small cube: "))
The volume of the 27 identical cubes is calculated on the next line;
volume = 27 * length**3
Lastly, the calculated volume of the 27 cubes is printed
print("Volume: "+(str(volume)))
Answer:
Optional
Explanation:
Variable declaration means when you declaring a variable in the code,whenever you want to use a variable you should declare it or define the variable with come constant.
<u>Example</u>
var name ;
The variable has no value after the statement (technically it has undefined value). Declaring a variable without var keyword is not recommended. An current global variable may accidentally be overwritten.
<u>Example</u>
a=2;
The range of variables declared without var keywords becomes global regardless of where they are declared