1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lelu [443]
2 years ago
9

Describe the necessary Java commands to create a Java program for creating a lottery program using arrays and methods.

Computers and Technology
2 answers:
netineya [11]2 years ago
5 0
I think each lottery ticket will cost £5 each so you would count in 5s till you reach the amount of tickets to get the answer which is £25
wariber [46]2 years ago
5 0

Answer: would use the for loop in this java program. A for loop is a repetition control structure that allows you to write a loop that needs to be executed a specific number of times which is why it's beneficial for the lottery program. A for loop is useful when you know how many times a task is to be repeated. import java.util.Random;import java.util.Scanner;public class LotteryGame

{  public static void main(String[] args) {     // TODO Auto-generated method stub     

Random r = new Random();     
int random[] = new int[5];   

  for (int i = 0; i < 5; ++i) {   
     random[i] = r.nextInt(48) + 1;     } 

    Scanner


sc = new Scanner(System.in);    
 int usernumbers[] = new int[5];     

System.out.print("Enter 5 numbers: ");  

   for (int i = 0; i < 5; ++i) { 

  usernumbers[i] = sc.nextInt();     }     

System.out.print("\nRandom Numbers: ");    
 for (int i = 0; i < 5; ++i)        

System.out.print(random[i] + " ");  
   System.out.print("\nUser Entered Numbers: ");     for (int i = 0; i < 5; ++i)        

System.out.print(usernumbers[i] + " ");   

  int match = 0;    
 for (int i = 0; i < 5; ++i) {       
 for (int j = 0; j < 5; ++j) {          

 if (random[i] == usernumbers[j])              
++match;        }

     }     
System.out.println("\nThere are " + match + " number of matches");  }

Explanation:

You might be interested in
Ron is in the process of designing tables for a database that will contain information for all school matches played in a year.
solong [7]
Primary Key, if we define field as primary key it will not accept duplicate values.<span>
</span>
6 0
3 years ago
To StaySafe while working near powerlines, you should______ to determine the safe working distance.
irina1246 [14]
Verify the lines voltage i believe is the right answer
8 0
3 years ago
type the correct answer in the box. Spell all words correctly. Which element of the presentation software can you use to add cal
Anuta_ua [19.1K]

Answer:

The element of the presentation software that can be used to add callous and banners is SHAPES

Using the INSERT TAB, you can add callouts and banners to a slide.

Explanation:

If you want to add callouts and banners to a slide, the presentation software that can be used is PowerPoint.

The element that is used to add it is called shapes and can be found in the Insert Tab.

6 0
3 years ago
Ruth-Anne has created a document. She wants page 3 and all the pages after it to be formatted with two columns.
sertanlavr [38]

The correct answer is D. Go to page 3, click Page Layout, click Columns, click two.

Explanation

When you want to make a digital document, one of the most recommended tools for its quality and ease is Microsoft Word. In this program, you can edit documents as you wish, change the font, the font size, the distance of the margins, among other options. One of the options offered by this program is to add two or more columns of text, to carry out this action it is necessary to go to the page where you want to put two or more columns (in the case of Ruth-Anne, page 3), then click Page Design, there a menu is displayed in which the Columns option is found, click this option and there it will give us the option to choose the number of columns that we want to put (in the case of Ruth-Anne two columns), this will make this and subsequent pages have this setting in two or more columns of text. Therefore, if Ruth-Anne needs to make these edits to her document, she must follow these steps. So the correct answer is D. Go to page 3, click Page Layout, click Columns, click two.

4 0
3 years ago
If the algorithm does not have instructions for unanticipated results, the computer program will
bixtya [17]
ANSWER: The computer program will ✔ halt . A(n) ✔ recipe is an algorithm.

BRAINLIEST please and good luck!
7 0
3 years ago
Other questions:
  • A group of eight bits is called a _______. a. numeric data b. byte c. megabit d. binary
    5·1 answer
  • Which of the following statements is true?
    10·1 answer
  • What two different types of encryption can be used by ipsec during data transfer?​?
    5·1 answer
  • The help desk received a call from a user who cannot get any print jobs to print on the locally shared printer. While questionin
    10·2 answers
  • Which changes should be made to establish and maintain formal writing conventions? Select two options.
    10·1 answer
  • A file with a com extension is most likely to be a(n) ___ file.
    13·2 answers
  • Would a hurricane form if the humidity is really high and the breeze is very low
    11·1 answer
  • What techniques can be used to assess a product?
    12·2 answers
  • Which font is most suitable for an academic article on a website? Which is most suitable for casual information?
    5·2 answers
  • A computer screen that is contained in its own case and is not part of the computer system is called a
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!