Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package digits;
- import java.util.Scanner;
- public class Digits {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- int number,tens,ones =0;
- System.out.print("Please enter a two digit number");
- number=input.nextInt();
- tens=number/10;
- ones=number%10;
- System.out.print(tens+" is the number in the tens collumn.\n");
- System.out.println(ones+" is the number is the ones collumn.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement