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
Serhud [2]
3 years ago
13

Write a program that deliberately contains an endless or infinite while loop. The loop should generate multiplication questions

with single digit random integers. Users can answer the questions and get immediate feedback. After each question, the user should be able to stop the questions and get an overall result. See Example Output.
Computers and Technology
1 answer:
Westkost [7]3 years ago
3 0

Answer:

The Java code is given below with appropriate variable names for better understanding

Explanation:

import java.util.Random;

import java.util.Scanner;

public class MultiplicationQuestions {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       Random rand = new Random();

       int n1, n2, result, total = 0, correct = 0;

       char ch = 'y';

       while(ch == 'y'){

           n1 = 1 + rand.nextInt(9);

           n2 = 1 + rand.nextInt(9);

           System.out.print("What is "+n1+" * "+n2+" ? ");

           result = scan.nextInt();

           if(result==n1*n2){

               System.out.println("Correct. Nice work!");

               correct++;

           }

           else{

               System.out.println("Incorrect. The product is "+(n1*n2));

           }

           System.out.print("Want more questions y or n ? ");

           ch = scan.next().charAt(0);

           total++;

       }

       System.out.println("You scored "+correct+" out of "+total);

   }

}

You might be interested in
What type of network access control uses Active Directory to scan a device to verify that it is in compliance?
Komok [63]

Answer:

Agentless NAC

Explanation:

An active directory is a kind of storage service that holds data of objects like user credentials, resource location etc, for permission and network access authentication.

Network access control is a form of computer network security that integrates security technology like antivirus, intrusion detection and prevention systems etc to system authorisation and authentication processes to control access to a network.

An agentless network access control uses the active directory to scan devices to confirm its compliance to security policies.

3 0
4 years ago
Importance of word processing application​
alina1380 [7]

Answer:

Some of the functions of word processing software include: Creating, editing, saving and printing documents. Copying, pasting, moving and deleting text within a document. Formatting text, such as font type, bolding, underlining or italicizing.

Explanation:

8 0
4 years ago
Which tab will you use to format data in cells?
kaheart [24]

Answer:

It's home tab

Explanation:

7 0
3 years ago
Read 2 more answers
How does a Graphical User Interface (GUI) interact with a desktop or laptop computer?
Viefleur [7K]

Windows, icons, menus, and pointers does  a  graphical  user interface (GUI) interact with a  desktop or laptop computer.

  • Windows, icons, menus, and pointers

<u>Explanation:</u>

Graphics user interface (gui) made a big resolution on desktop or laptop or tablet or workstation industries. In olden days till  1994 still, people were using the black and white computer where a desktop consists of keyboard and printer and monitors where display color white and black.

If we open a picture it will display only in black and white so games are in black and white mode. After windows  3.1  we have seen color picture and mouse interface is used. Since technology developed and interface in GUI is also developed improved in windows icon menu and mouse pointer.

As technology developed we going back to a dark mode such as black and white mode.

4 0
3 years ago
Scanning for viruses and checking for patches are two ways to software
levacccp [35]
The correct answer would be "C". This is because troubleshooting means searching for troubles in a system or software. B and D wouldn't make sense, but A would work better. The reason A doesn't work is because updating software isn't scanning for viruses and checking for patches.

In conclusion, the answer is C. I hope this helps. Don't worry, you can ask if you need better understanding!
4 0
3 years ago
Read 2 more answers
Other questions:
  • Connected contacts require___ to open.
    11·1 answer
  • How has technology influenced space exploration?
    13·1 answer
  • Write an original idiom that uses the word dog or dogs im in 4th
    5·2 answers
  • A self-confident person knows that:
    13·1 answer
  • When do images or graphics in Microsoft Word hurt the document rather than help
    9·1 answer
  • Write a program that uses for loops to perform the following steps: Prompt the user to input two integers: firstNum and secondNu
    15·1 answer
  • A manager would like information on the knowledge base searches conducted by customers and call center agents. Which two metrics
    10·1 answer
  • Wireless data networks are particularly susceptible to known ciphertext attacks.
    10·1 answer
  • 3.3 Code Practice: Question 1
    15·1 answer
  • You saved a file on drive C go your computer. You want to find and open the file. Which of the following programs will you use t
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!