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
Each student has a record on a file consisting of the following data: Student last name, Student ID (numeric), GPA (a decimal nu
slavikrds [6]

Answer:

#include<iostream>

using namespace std;

struct student {

   string name;

   int id;

   float gpa;

   int major;

};

int main() {

   student student1;

   student1.name="Patil";

   student1.id=1;

   student1.gpa=9.80;

   student1.major=123;

   cout<<"First student last name: "<<student1.name;

}

Explanation:

A struct is a container or data structure in C and C++ that holds data that describes or represents an object. It is defined with the struct keyword. Just like a class constructor method, the struct is called with the struct name and the instance name of the struct.

The student struct above is used to create an instance of students registered in a school. The first student struct instance is the 'student1'.

7 0
3 years ago
What part of a check is the LEAST important?
Dmitriy789 [7]
The answer is

The memo line
7 0
4 years ago
Read 2 more answers
Write a program in qbasic to accept a character and check it is vowel or consonant​
Alborosie

Answer:

In sub procedure or normal program?

6 0
3 years ago
Which best describes rfid technology?
Liula [17]
RFID stands for <span>Radio-Frequency Identification. RFID is the use of radio waves to reach and capture data. The RFID chip can hold about 2,000 bytes of info.
</span><span>The RFID device serves the same purpose as a bar code or a magnetic strip on the back of a credit card or ATM card; it provides a unique identifier for that object. And, just as a bar code or magnetic strip must be scanned to get the information, the RFID device must be scanned to retrieve the identifying information.</span>
4 0
3 years ago
A. Requiring computer users to log off before leaving for lunch
GuDViN [60]

Answer:

Option A, B, and D.

Explanation:

In the above question, the some details of the question are missing that is the part of the question.

Information Security applies to the mechanisms and techniques built and maintained to secure print, computerized, or any other type of personal, secret and confidential information or records from unauthorized access, usage, exploitation, release, damage, manipulation, or disturbance.

So, the following are the option that is true about the scenario.

Other option is not true about the scenario because Option C the click fraud are not the part or protect from the information security and Option F is not considered to the following scenario.

7 0
3 years ago
Other questions:
  • Throwing an improperly drained oil filter into the trash dumpster is a violation that can carry heavy penalties. A) true b) fals
    7·1 answer
  • Which statement is used to create a file object that will append data to an existing file? BufferedWriter salesdata =
    7·2 answers
  • Which scenario depicts an ethical workplace practice by a business owner? A. sharing personal information of its employees with
    8·2 answers
  • Write a C++ program that allows the user to enter double values. Display one of two messages: "The first number you entered is l
    9·1 answer
  • You have a web application hosted in AWS cloud where the application logs are sent to Amazon CloudWatch. Lately, the web applica
    7·1 answer
  • What was the first computer programming language?
    7·2 answers
  • The administrators of Tiny College are so pleased with your design and implementation of their student registra- tion and tracki
    13·1 answer
  • What is the best stratiget to avoid paying intrest in your credit cared
    13·1 answer
  • WILL GIVE BRAINLIEST!!!!!!!
    10·2 answers
  • What would a good digital citizen do if he sees his classmate left her email account open on a school computer by mistake?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!