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
uysha [10]
3 years ago
10

The user will input a three digit number

Computers and Technology
1 answer:
zlopas [31]3 years ago
5 0

import java.util.Scanner;

public class U1_L5_Activity_One {

public static void main(String[] args) {

Scanner scan = new Scanner(System.in);

System.out.print("Please enter a two digit number: ");

int x = scan.nextInt();

System.out.println("Here are the digits:");

System.out.println(x/100);

System.out.println((x/10)%10); <em>//Just divide the result by 10 and find the remainder</em>

System.out.println(x%10);  

}

}

<em>//Or, you can do that way:</em>

<em />

import java.util.Scanner;

 

public class U1_L5_Activity_One {

public static void main(String[] args) {

Scanner scan = new Scanner(System.in);

System.out.print("Please enter a two digit number: ");

String[] x = scan.nextLine().split(""); <em>//We need it to be a string array, to split the values after "", that is, after each symbol(number)</em>

System.out.println("Here are the digits:");

for(int i = 0; i<x.length; i++) {

          System.out.println(Integer.parseInt(x[i])); <em>//Converting the string into int, as you want</em>

      }  

}

}

You might be interested in
In Word you can _____ or merge two different copies of the same document into one document. a. replicate b. duplicate c. copy d.
defon
D) combine
combine and merge are synonyms of each other.
hope this helps x
6 0
3 years ago
Consider a multiprocessor CPU scheduling policy. There are 2 options: 1) a singlecommon ready queue of jobs; when a CPU becomes
UNO [17]

Explanation:

A ready queue is more adequate since in this method the load balancing occurs in a proper way. The goal of multiple processing is the correct distribution of load.

But in the cases when a processor is doing quicker or taking a smaller queue, it will self assign processes allotted for execution, configuring it with a constant busy state.

3 0
3 years ago
Which of the following sentences is written in a passive voice
Vinvika [58]

Answer Choices ?? I can help if you have those



8 0
3 years ago
Read 2 more answers
"if x and y are odd integers, then x + y is even"
Naddika [18.5K]

Answer:

Hello!

The statement is "if x and y are odd integers, then x + y is even"

and we want to prove it by contradiction.

Suppose that we have x and y odd numbers, and suppose that his addition is odd.

We know that an odd number can be writen as (2n +1) (and a even number can be written as 2n) where n is an integer number; then:

x = (2k + 1) and y = (2m + 1)

and x + y = j, where j is also a odd number, then j = (2h + 1)

then:

2k + 1 + 2m + 1 = 2h + 1

2(k + m) + 2 = 2h + 1

2(k + m) +1 = 2h

if k and m are integers, then k + m is also an integer, suppose that k + m = g

then 2g + 1 = 2h

this says that in odd number is equal to an even number, then we have a contradiction, and the addition of two odd numbers cant be an odd number.

8 0
4 years ago
Kenny needs to keep client information such as names and addresses. She should use a
Aneli [31]
Folder!
They cost like 97. Cents
5 0
3 years ago
Read 2 more answers
Other questions:
  • A rich text format (RTF) provides an electronic image of a document and can be viewed, printed, and electronically transmitted.
    7·1 answer
  • Why do nonprofit agencies include blogs on there website?
    10·1 answer
  • Why is it unlawful for an employer to refuse to employ someone based solely on their gender without evidence that such a charact
    9·1 answer
  • Which of the following is the most significant outcome of the formation of the SMPTE?
    6·2 answers
  • I need help with getting a profile pic
    5·1 answer
  • MAN speeds are faster than WAN speeds because of ________. technological limitations regulatory limitations
    6·1 answer
  • I need help with the last question pleasee help me guys .
    11·2 answers
  • ফাইল ও ফোল্ডারের মধ্যে পার্থক্য কি এবং ৫ টি ইনপুট ডিভাইসের নাম কি​
    7·2 answers
  • What enforces the location in which an app can function by tracking the location of the mobile device?
    10·1 answer
  • When you try to move the desktop icon using the click and drag method and it doesn't move, what is the reason?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!