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
The computer uses unallocated space for what​
finlep [7]

A computer uses unallocated space also know as free space to keep a file that has been deleted in its disk until a new file takes it spot and overwrites it.

3 0
3 years ago
Read 2 more answers
Evidence left behind by participants or observers is an example of what kind of resource?
Natasha2012 [34]
The answer should be D
6 0
3 years ago
Read 2 more answers
Match the correct pairs of column A and B to prove your computer
ohaa [14]

Explanation:

1 Ms word - b. Word processing software

2 Pagemaker - c desktop publishing

3 Ms excel - f finance and data analyses

4 dbase - a database management system

6 Mcafee/Norton - d anti-virus software

7 virus - h computer program that can replicate itself

8 inbox, compose,.............. - parts of an email account

5 0
2 years ago
If you have an if/else if/else code sequence with 4 blocks, what is the minimal number of input values that you should use to te
yawa3891 [41]

Answer:

4 is the correct answer for the above question.

Explanation:

  • If the if-else sequence has 4 blocks then it will be designed like if, else-if, else-if and then else which made 4 blocks which are as follows:-
  1. The first block is an if block.
  2. Then the second block is an else-if block.
  3. The third block is also else-if block and
  4. The fourth block else blocks.
  • So there is a need of 4 value (one value for each case) to test the application which is defined in the above scenario.
  • It is because when the first if statement is false then the first else-if statement is executed and when the first else statement is false then the second else-if statement is executed and when it is false then the else statement will executed.
7 0
2 years ago
What is 4991 rounded to the nearest thousand
evablogger [386]

Answer:

5000

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • When a person buys something from an app store, the cost of the item is charged to a credit card whose number often is known by
    5·1 answer
  • Marginal ________ shows how much money can be made if a producer sells one additional unit of a good.
    7·2 answers
  • What are the methods of identifying publicly switched networks?
    14·1 answer
  • A posting error is:
    8·1 answer
  • Individual internet users connect to isps through a(n ________.
    11·1 answer
  • Write a valid HTML + Python page that will count numbered from 1 to 1,000,000?​
    9·1 answer
  • The pinky finger on the right hand types _____.
    15·2 answers
  • A __________ is a thorough examination of each aspect of a network to determine how it may be compromised.
    13·1 answer
  • Which principle or element of layout design is highlighted in this event poster?
    7·1 answer
  • What is a good theme statement for the short Pixar film "bao"?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!