Answer:
Java code is given below
Explanation:
import java.util.Random;
class Die{
private int sides;
public Die(){
sides = 6;
}
public Die(int s){
sides = s;
}
public int Roll(){
Random r = new Random();
return r.nextInt(6)+1;
}
}
class DieRoll{
public static void main(String[] args) {
Die die = new Die();
int arr[] = new int[6];
for(int i=0; i<6; i++)
arr[i] = 0;
for(int i=0; i<100; i++){
int r = die.Roll();
arr[r-1]++;
}
for(int i=0; i<6; i++)
System.out.println((i+1)+" was rolled "+arr[i]+" times.");
}
}
Answer:
local Area Network, Wide Local Area Network and Personal Area Network
Answer:
loop
Explanation:
Loop is the one which is used to execute the specific statement again and again until the condition is true.
In the programming, there are 3 basic loop used.
1. for loop
<u>Syntax:</u>
for(initialization, condition, increment/decrement)
{
statement;
}
the above statement execute until the condition in the for loop true when it goes to false, the loop will terminate.
2. while loop
<u>Syntax:</u>
initialization;
while(condition)
{
statement;
increment/decrement;
}
it is work same as for loop and the increment/decrement can be write after or before the statement.
3. do while
syntax:
initialization;
do
{
statement;
increment/decrement;
}while(condition);
here, the statement execute first then, it check the condition is true or not.
so, if the condition is false it execute the statement one time. this is different with other loops.
That's B.
Linguist love all kinds of studies of languages culture writing etc.
Answer:
ink jet
Explanation:
Great at producing photo quality prints and image-heavy documents, as inkjet printers do a better job of blending and producing vibrant colors than laser printers. The price of an inkjet printer is less than most laser printers.