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:
Output device.
Explanation:
An output device can be defined as a hardware device that typically receives processed data from the central processing unit (CPU) and converts these data into information that can be used by the end user of a computer system.
All of the output device of a computer are known as peripheral devices and they provide data (informations) to the end users in various formats such as video, audio, texts, images etc.
Since output devices are peripheral devices, they can be connected to the computer system wirelessly or through a wired-connection (cable).
Some examples of output devices are monitor, speakers, printer, projector etc.
Hence, when you hear music, read a printout, or view a video, you are using a computer's output device.
Here are some.
- <html></html> This is the root element tag. ...
- <head></head> ...
- <title></title> ...
- <body></body> ...
- <h1></h1> ...
- <p></p> ...
- <a></a> ...
- <img></img>
<h2>hope it helps.</h2><h2>stay safe healthy and happy....</h2>