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
Grace [21]
3 years ago
13

Write a Java program that accepts an integer number from the user between 20 and 100. Next, divide the number by 12 and determin

e if the remainder is even or odd.
Inputs: The program must prompt the user for an integer value between 20 and 100.
Enter an integer between 20 and 100:
Output: The program should have an output similar to this. The < and > symbols will contain the actual values entered and calculated.
The remainder of divided by 12 is , and it is .
Example of a program run: The value 35 is entered by the user
Enter an integer between 20 and 100: 35
The remainder of 35 divided by 12 is 11, and it is odd.
Computers and Technology
1 answer:
Eddi Din [679]3 years ago
4 0
Import java.util.Scanner;
class hola
{
public static void main(String[]args)
{
Scanner x=new Scanner(System.in);
int a=x.nextInt();
int b;
if(a>20&&a<100)
{
b=a%12;
if(b%2==0){
System.out.print("es par"+b);
}
else{
System.out.print("es impar"+b);
}
}
}

}
You might be interested in
Write a program that reads a floating-point number from the user and prints "zero", "positive" or "negative"
Lorico [155]
```
#!/usr/local/bin/python3

foo = float( input( "Enter a number: " ) )
if( foo < 0.0 ):
    print( "negative" )
elif( foo > 0.0 ):
    print( "positive" )
else
    print( "zero" )

exit( 0 )
```

3 0
3 years ago
Which one of these choices best describes what exec() does:a) It replaces the current process with a new oneb) It executes a new
Dimas [21]

Answer:

Option b It executes a new process, which runs at the same time as the parent

Explanation:

The exec is one of the Java Runtime methods which is used to create a new process and run it as an separate process. Exec method executes the string command that we place inside the bracket. For example,

Process proc = Runtime.getRuntime().exec("Notepad.exe");

The statement above offers a convenient way to open the another computer software such as Notepad when running the program.  

3 0
3 years ago
which of the following is not an e-reader you would use as a alternative to carrying around a set of textbooks?
musickatia [10]

I have a kindle paper white that I downloaded all of my avalible textbook onto if that helps I find it much better then carrying around a bunch of textbooks
4 0
3 years ago
Enter just the letter of the correct answer
astraxan [27]

purchase a router from the aisle

8 0
3 years ago
The instantiation of an endpoint in a potential TCP connection is known as a _____
poizon [28]

The answer is socket.

7 0
3 years ago
Other questions:
  • If you want to add a picture to your document, you can __________. (Select all that apply.)
    10·1 answer
  • I just want to ask if some one know an online school program that offer a live session and the cost of it not to expensive. for
    10·1 answer
  • How many inches do a tire have to be to sometimes be refer as bald of balding tries
    14·1 answer
  • For which of the following is a bulleted list more appropriate than a numbered list?
    6·1 answer
  • Why is formatting important with a table?
    12·1 answer
  • If cell G7 contains the function ________, it states that if the value in cell C3 is 9, the number 7 will be assigned to cell G7
    6·1 answer
  • The data _____ component of a database management system (DBMS) is used to create and maintain the data dictionary. manipulation
    14·1 answer
  • Which of the following are causes of a run-time error. Choose all that apply.
    13·1 answer
  • Can you please help me
    9·1 answer
  • Why is it important to prepare the farm resources before you start working? explain​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!