Question

JAVA help

Write a program that can perform three different activities:


Generate one random integer from 2 to 10, and then display all of the numbers from 100 to 200 that are evenly divisible by the random integer.

Generate one random positive integer from 2 to 200, and then display all of the prime numbers from 2 to the random integer.

Generate one random positive integer from 1 to 100, and then display all of the numbers in octal notation from 1 to the random integer.

When the program is run, a number from 1 to 3 should be randomly generated to determine which of the three tasks should be performed.


0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 9 more requests to produce the answer.

1 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
JAVA help
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Summary: Write a C program that prompts the user to enter 2 positive integer numbers, display...

    Summary: Write a C program that prompts the user to enter 2 positive integer numbers, display the numbers in 3 formats. Then check, whether the larger of the 2 is evenly divisible by the smaller. Detail: Write a complete C program, more complex than the typical "hello world" program. Prompt the user to enter 2 integer numbers that are not negative. After either entry, display that number again. Print the smaller in hexadecimal, in decimal, and in octal format. Include...

  • Please help me the JAVA program - Choose Your Operation Write a program that uses a...

    Please help me the JAVA program - Choose Your Operation Write a program that uses a WidgetView object to do the following: Generate two random integers between 1 and 9 (inclusive). Name one of them x, the other y. Display them to the user using JLabel objects. Create a JLabel object displaying the text "Enter an operation number." Create a JTextField for the user's input. Create a JButton displaying the text "Press here when you've entered your operation." Use addAndWait...

  • A prime number is a method that is evenly divisible by only itslef and 1. Write...

    A prime number is a method that is evenly divisible by only itslef and 1. Write a method called isPrime, which takes only one integer as an argument and returns true if the number is prime or false if the number is not prime. Create a method to store a list of all the prime numbers from 1 to 100 in a file called Primes.txt. Use the package primes; at the beginning of your code and be sure to document...

  • Is Prime Number In this program, you will be using C++ programming constructs, such as functions....

    Is Prime Number In this program, you will be using C++ programming constructs, such as functions. main.cpp Write a program that asks the user to enter a positive integer, and outputs a message indicating whether the integer is a prime number. If the user enters a negative integer, output an error message. isPrime Create a function called isPrime that contains one integer parameter, and returns a boolean result. If the integer input is a prime number, then this function returns...

  • Application program           Program name      PrimeNumbers.cpp           Problem background:        &n

    Application program           Program name      PrimeNumbers.cpp           Problem background:                    In mathematics, a PRIME number is a number that is divisible by only                    itself and 1.           Examples:                    2, 3, 5, 7, 11 are all primes                    these are not primes the number 4        divisible by 2 the number 6        divisible by 2 and 3 the number 12       divisible by 2, 3, 4, and 6 Write a C program to find all the prime numbers between 0 and...

  • write program above in C only Write a program to find statistics on some random numbers....

    write program above in C only Write a program to find statistics on some random numbers. Seed the random number generator with time. In a for loop generate 12 random numbers between the values of 2 and 20. Print the numbers. As the numbers are generated, find the following: the number of even numbers (those evenly divisible by 2) e the sum of the even numbers the product of the even numbers the maximum value of all the numbers e

  • use simple C++ please Exercise 3: Write a program that reads a positive number and checks...

    use simple C++ please Exercise 3: Write a program that reads a positive number and checks if the number can be expressed as a sum of two prime numbers. If yes, write all possible ways of expressing the number as sum of primes. Note: n is a prime if it is divisible only by 1 and itself, hence not divisible by any integer in the range from 2 to sqrt(n), both inclusive. Write a function is Prime that take a...

  • a prime number is a number that is only evenly divisible by itself and 1. for...

    a prime number is a number that is only evenly divisible by itself and 1. for example the number 5 is prime because it can only be evenly divided by 1 and 5 the number 6 however is not prime because it can be divided evenly by 1,2,3 and 6. write a function name isPrime which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. use this functuion in a...

  • Program Instructions: Write a C++ program that uses a random number generator to generate a two...

    Program Instructions: Write a C++ program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: Double the number. Reverse the digits of the number. Raise the number to the power of 2, 3, or 4. Sum the digits of the number. If the number is a two digit number, then raise the first digit to the power of the second digit. If the...

  • Write a program that uses a random number generator to generate a two digit positive integer...

    Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. Double the number. b. Reverse the digits of the number. c. Raise the number to the power of 2, 3, or 4. d. Sum the digits of the number. e. If the number is a two digit number, then raise the first digit to the power of the second digit....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT