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
B. Does “refactoring” mean that you modify the entire design iteratively? If not, what does it mean?
Liono4ka [1.6K]

Explanation:

Refactoring consists of improving the internal structure of an existing program's source code, while preserving its external behavior. 

6 0
3 years ago
List three functions that you can perform with a database that you cannot perform with a spreadsheet.
Delicious77 [7]
There are some function which can be performed with database but not with a spread sheet, these functions include: 
1. Enforcement of data type.
2. Support for self documentation.
3. Defining the relationship among constraints in order to ensure consistency of data.
5 0
3 years ago
A lead views a specific page on your website, say, your case study page. You then send targeted follow-up content like one of yo
IRINA_888 [86]

Answer:

Behavioral Email                                

Explanation:

A behavioral email is an automated email which is sent to recipients on the basis of their behavior. These emails are sent after a user communicates with a business on social media, the company’s website, email, and other communication medium. Behavioral emails help to grow customer involvement and sales. Behavioral email can also be used as a marketing strategy, used by marketers to gather data about an email subscriber in order to send targeted content to that subscriber on the basis of his behavior or actions. When the marketer sends an email to the customer, it is appropriate for that customer, based on the data gathered and their current monitored behavior. Behavioral email helps to understand costumer needs. It helps to get an idea of a customers preferences by inspecting his behavior.

5 0
3 years ago
Ano ang<br> rotasyon ng daigdig​
Degger [83]

Answer:  are you tying to ask a question

Explanation:

6 0
3 years ago
Read 2 more answers
Advantages of a compiler​
valentina_108 [34]

Answer:

Improved performance.

Reduced system load.

Protection for source code and programs.

Improved productivity and quality.

Portability of compiled programs.

SAA compliance checking.

3 0
3 years ago
Read 2 more answers
Other questions:
  • 1. Create a view named customer_addresses that shows the shipping and billing addresses for each customer.
    15·1 answer
  • The data I collect in Google Forms are all compiled in a spreadsheet for me.<br> False <br> True
    12·2 answers
  • In c++ 11, the ________ tells the compiler to determine the variable's data type from the initialization value.
    6·1 answer
  • Which role involves designing and creating advertisements for marketing purposes?
    14·2 answers
  • What is word processors​
    8·1 answer
  • When a collection of honeypots connects several honeypot systems on a subnet, it may be called a(n) honeynet
    9·1 answer
  • Given a class called Measure that has the methods and data as specified, choose the correct code to satisfy the requirements of
    13·1 answer
  • When you are ready to print your document, what tab and command should you choose from the menu?
    11·2 answers
  • if anyone is on a Chromebook, do you ever mean to press backspace, then you accidentally press the power button and think "OH CR
    11·2 answers
  • What is the difference between password protection and encryption? please answer quick, i cant pass this test for the life of me
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!