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
Irina-Kira [14]
3 years ago
12

JAVAplzzz help...........​

Computers and Technology
1 answer:
Scilla [17]3 years ago
5 0

Answer:

import java.util.Scanner;

class Main {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   while(true) {

     System.out.print("Enter an integer (0 to exit): ");

     int num = scan.nextInt();

     if (num == 0) break;

     if (num%3 == 0 && num%5 == 0) {

       System.out.printf("%d is divisable by both 3 and 5.\n", num);

     }

     else if (num%3 == 0 && num%5 != 0) {

       System.out.printf("%d is divisable by 3 but not by 5.\n", num);

     }

     else if (num%3 != 0 && num%5 == 0) {

       System.out.printf("%d is divisable by 5 but not by 3.\n", num);

     } else {

       System.out.printf("%d is not divisable by 3 or 5.\n", num);

     }

   }

   scan.close();

 }

}

You might be interested in
For the function below, list 4 ordered pairs for that function.<br> y = 3x + 1
RoseWind [281]

Answer:

(1, 4)

(2, 7)

(0, 1)

(-1, -2)

Explanation:

to find <em>ordered pairs</em>, we plug in different values for x.

(remember, and "ordered pair" is (x, y)--the first number turns into the second number when put through the function)

<em>usually, it's easiest to plug in smaller numbers, so that it is less complicated to graph </em>

so, here's a few x values:

x = 1

y = 3x + 1

y = 3(1) + 1

y = 3 + 1

y = 4

so, when x = 1, y = 4

we write this as: (1, 4)

x = 2

y = 3x + 1

y = 3(2) + 1

y = 6 + 1

y = 7

so, when x = 2, y = 7

we write this as: (2, 7)

x = 0

y = 3x + 1

y = 3(0) + 1

y = 0 + 1

y = 1

so, when x = 0, y = 1

we write this as: (0, 1)

x = -1

y = 3x + 1

y = 3(-1) + 1

y = -3 + 1

y = -2

so, when x = -1, y = -2

we write this as: (-1, -2)

hope this helps!! have a lovely day :)

4 0
2 years ago
Without any formal planning, the president of a software company remarks in a speech that new technologically advanced software
ahrayia [7]

Answer:

<em>Imposed project deadlines.</em>

Explanation:

The term of project management imposed deadline<em> refers mainly to the calendar-based dividing line used to determine a fixed time or date on which the project management team has projected and/or developed that the particular schedule of work and/or schedule of work events.</em>

6 0
4 years ago
What does a closed-envelope icon next to an e-mail message header indicate?\?
Fynjy0 [20]
That it was unread that’s what mine means
7 0
4 years ago
Write a program that inputs a text file. The program should print the unique words in the file in alphabetical order. Uppercase
satela [25.4K]

Answer:

Read the file and save it to a variable as a string, split the string variable and cast it to a set object using the set function to get the unique words in the file. Then use the max function with the key attribute to use regular expression module "re" to compare the first letter of each item to return in a list comprehension or append to a list.

Explanation:

The open function is used to import a file in python, the split string method splits the string to a list of items and the set function removes any duplicates of a word or item.

Using the for loop statement, iterate over the items and compare and return the items in alphabetical order with the 're' search method getting the item with uppercase letters with higher precedence than lowercase.

5 0
3 years ago
The factorial of an integer N is the product of the integers between 1 and N, inclusive. Write a while loop that computes the fa
alexdok [17]

the function and loop will be

def factorial(x):

   total = 1

   if x != 1 and x != 0:

       for i in range(x,1,-1):

           total *= i

   return total

3 0
4 years ago
Other questions:
  • What is intellectual property?
    7·1 answer
  • Passing structured query language commands to a web application and getting the website to execute it is called SQL script:_____
    12·1 answer
  • Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)
    12·1 answer
  • What is the correct method to use Dreamweaver to find broken links and orphaned files?
    15·1 answer
  • What kind of storage is an internet service that provides storage to computer users?
    12·1 answer
  • WILL GIVE BRAINLIEST
    5·2 answers
  • Charles wants to work for himself in the Transportation and Logistics career cluster. Which lists the jobs with the best
    7·2 answers
  • Which of the following industries utilize computer science?
    13·1 answer
  • List resource you can utilize if you are experiencing technology issued
    5·1 answer
  • 4.1 code practice python
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!