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]
2 years ago
10

The user will input a three digit number

Computers and Technology
1 answer:
zlopas [31]2 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
When you're working with a word processing document and you press the del key, what happens?
Svetach [21]

The <DEL> or <Delete> key makes the first character AFTER the cursor
disappear, and everything after it then moves back one space to close up
the hole.

Example: 

If I have this in my document ...                          Most trees are green.

And my cursor is after the 'a', like this:                Most trees a|re green.

Now, if I hit the <delete> key, it deletes the
'r' after the cursor, and the hole closes up,
and the cursor stays where it is:                          Most trees a|e green.


5 0
2 years ago
Read 2 more answers
A pointing device controls the movement of the ____.
andrey2020 [161]
<span>A pointing device controls the movement of the </span>Mouse Pointer
3 0
3 years ago
You will be creating a program that implements the Observer design pattern. This design pattern is utilized in almost all GUI sy
Nuetrik [128]
B
Is the correct answer
7 0
3 years ago
Identfy two duties of the governer stationed at mombasa under portugues rule?​
Tpy6a [65]

Answer:I got u

Explanation:

6 0
2 years ago
Which operation would occur in the equation =C3+D5*C6-B2 in excel.
UkoKoshka [18]

Answer:

The operation that will occur first is D5*C6 (multiplication).

Explanation:

Excel’s default order of operator precedence mandates that Excel perform multiplication before addition and substraction. If you want the addition or substraction to be performed before multiplication or division, they must be in parentheses.

The order of operations in exel is:

1. Evaluate items in parentheses.

2. Evaluate ranges (:).

3. Evaluate intersections (spaces).

4. Evaluate unions (,).

5. Perform negation (-).

6. Convert percentages (%).

7. Perform exponentiation (^).

8. Perform multiplication (*) and division (/), which are of equal precedence.

9. Perform addition (+) and subtraction (-), which are of equal precedence.

10. Evaluate text operators (&).

11. Perform comparisons (=, <>, <=, >=).

5 0
2 years ago
Other questions:
  • SI TENGO: ¿R = 255, G0 =, B = 0, QUE COLOR OBTENGO?
    14·1 answer
  • Sending a employee an email with important criticism represents a problem which communication process
    9·1 answer
  • What does the Additional Clock tab do?
    11·1 answer
  • A page with no meaningful content that is full of ads and the webmaster makes money from if someone clicks on them is called____
    7·1 answer
  • Graphic design includes typefaces, page layouts, corporate logos, and product packaging. Which modern graphic designer is best k
    14·2 answers
  • Gabe Kelp is a fourteen-year-old goalie for the Soaring Eagles soccer team. He and his teammates are each creating a screen name
    11·1 answer
  • Michael needs to ensure that those items that are automatically archived are still easily accessible within Outlook. Which optio
    7·2 answers
  • Write a C function named apply_all that expects two arrays of integers and their sizes and dynamically allocates a new array of
    7·1 answer
  • You use lpstat and determine that a user named User1 has placed two large print jobs in the queue for Printer1 that have yet to
    9·1 answer
  • __________ are very simple devices that connect network components, sending a packet of data to all other connected devices.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!