Advertisement
MelindaElezovic

ModuloDivision

Nov 5th, 2015
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. //Melinda
  2. //11.4.15
  3. //ModuloDivision
  4. import java.util.Scanner;
  5.  
  6. public class ModuloDivision
  7.   {
  8.     public static void main(String[] args)
  9.     {    
  10.     Scanner input = new Scanner (System.in);
  11.     System.out.println("Please choose a two digit number");
  12.     int num = input.nextInt();
  13.     int tens = num/10;
  14.     int ones = num%10;
  15.     System.out.println("The first digit is " +tens);
  16.     System.out.println("The second digit is " +ones);
  17.     }
  18.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement