subject

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();
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
Consider the following declarations (1, 2, 3, 5, 7)class bagtype{public: void set(string, double, double, double, double); void print() const; string getstyle() const; double getprice() const; void get(double, double, double, double); bagtype(); bagtype(string, double, double, double, double); private: string style: double l; double w; double h; double price; }; a.) write the definition of the number function set so that private members are set according to the parametersb.) write the definition of the member function print that prints the values of the data membersc.) write the definition of the default constructor of the class bagtype so that the private member variables are initialized to "", 0.0, 0.0, 0.0, 0.0, respectively d.) write a c++ statement that prints the value of the object newbag.e.) write a c++ statement that declares the object tempbag of type bagtype, and initialize the member variables of tempbag to "backpack", 15, 8, 20 and 49.99, respectively
Answers: 3
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
You know the right answer?
A bingo card has columns B, I, N, G, O and random numbers in the ranges (1-15, 16-30, 31-45, 46-60,...
Questions
question
Mathematics, 21.03.2020 02:07
question
Mathematics, 21.03.2020 02:08
Questions on the website: 13722363