colyernicholas44
22.03.2021 •
Computers and Technology
A bingo card has columns B, I, N, G, O and random numbers in the ranges (1-15, 16-30, 31-45, 46-60, 61- 75) down each column, with a “free” in the centre. Start off by creating the card. Evaluate a card given 20 number calls. Ask the user for whether they want to call “Bingo!” (It is not expected for the game to identify if the player has won.) This is my code pls make it so it is down each column and not row.
import java.util.Scanner;
import java.util.Random;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Random rand = new Random();
System.out.println("B\t|\tI\t|\tN\t|\tG\t|\tO\t|");
int[][] card = new int [6][6];
int temp;
for (int i = 1; i < card.length; i++) {
temp = rand.nextInt(15)+1;
card[0][i] = temp;
System.out.print(card[0][i] + " \t");
}
System.out.println();
for (int i1 = 1; i1 < card.length; i1++) {
temp = rand.nextInt(15)+14;
card[1][i1] = temp;
System.out.print(card[1][i1] + " \t");
}
System.out.println();
for (int i2 = 1; i2 < card.length; i2++) {
temp = rand.nextInt(15)+ 28;
card[2][i2] = temp;
System.out.print(card[2][i2] + " \t");
}
System.out.println();
for (int i3 = 1; i3 < card.length; i3++) {
temp = rand.nextInt(15)+42;
card[3][i3] = temp;
System.out.print(card[3][i3] + " \t");
}
System.out.println();
for (int i4 = 1; i4 < card.length; i4++) {
temp = rand.nextInt(15)+56;
card[4][i4] = temp;
System.out.print(card[4][i4] + " \t");
}
System.out.println();
}
}
Solved
Show answers
More tips
- H Health and Medicine Hangover: How to Get Rid of It Quickly?...
- A Auto and Moto How to Start a Diesel Engine in Cold Weather?...
- A Auto and Moto Which alarm system to choose?...
- P Photography and Videography What is lens calibration and why is it needed?...
- S Science and Technology How to Choose a Picture Frame: Tips and Recommendations...
- P Photography and Videography Understanding HDR: How It Works and Why You Need It...
- P Photography and Videography How to Choose the Perfect Photo Paper for Your Images?...
- C Computers and Internet How to Choose an Uninterruptible Power Supply (UPS) for Your Computer: Expert Tips...
- S Science and Technology How to choose a home theater system?...
- A Auto and Moto How to Choose a Car Wash? Tips and Recommendations...
Answers on questions: Computers and Technology
- C Computers and Technology Universal Containers wants to set up SSO for a selected group of users to access external applications from salesforce through App launcher. Which three steps must be completed...
- C Computers and Technology PLEASE HELP ARANGE THE TIMELINES ACCORDING TO THE ORDER IN WHICH THEY OCCURRED IN THE EVOLUTION OF DIGITAL MEDIA...
- M Mathematics Question is in the attachment again....
- B Biology What conclusion did the researchers from university of california san diego reach regarding the best type of material to use for beach nourishment? sandy areas of a beach...
- W World Languages The november presidential election is coming up and the current president is running for re-election. elise is a concerned citizen who believes that the current president...
- S Spanish Na sua casa, uma senhora resolveu tomar uma xícara de café com leite. ela colocou 100 g de café e 300 g de leite em uma xícara. considerando que o café estava a 80ºc e...
- S Spanish Uma gangorra de 5 metros de comprimento aonde duas crianças estão sentadas, uma em cada lado mantendo a gangorra equilibrada. sabendo-se que a gangorra tem braços desiguais...
- B Business Kawai corporation, which makes and sells 85,000 radios annually, currently purchases the radio speakers it uses for $8.00 each. each radio uses one speaker. the company...
- S Spanish El chef español es muy famoso. question 2 with 1 blankel arroz y el azafrán son ingredientes básicos de la . question 3 with 1 blankel prado está en . question 4 with 1...
- W World Languages Which of the following is not one of chomsky’s arguments for the existence of a language acquisition device? a. all human languages have common features b. children learn...
Ответ:
got a question 4 u
Explanation:
Ответ:
The two red points are lying on the line
let us call them A( on y axis) and B ( in third quadrant )
Co ordinates of A can be seen easily : 0 movement on x axis and +2 movement on y axis so co ordinates of A ( 0,2)
Co ordinates of B: -4 movement on x axis and -6 movement on y axis so co ordinates are ( -4,-6)
Let us say x1 y1 = (0,2) and x2 y2 = ( -4,-6)
first we find slope of this line : ( y2 - y1) divide by ( x2-x1)
: ( -6 -2 ) divide by ( -4 -0)=
: (-8) divide by ( -4 )
Slope m = +2
Now equation of line should be Y- y1 = m( X-x1)
Y - 2 = +2( X- 0)
Y - 2 = 2X
Y = 2X+ 2
This is the required equation of the line