Guest User

Untitled

a guest
Dec 11th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.93 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class EX3
  3. {
  4.  
  5.         /**
  6.          * @Alexander Grob CS 2011
  7.          */
  8.         public static void main(String[] args)
  9.         {
  10.         Scanner data = new Scanner(System.in);
  11.        
  12.         String wordT;
  13.         String wordOne,wordTwo;
  14.         int wordA;
  15.         int dot;
  16.                
  17.        
  18.         System.out.print("Please enter your first word:");
  19.        
  20.         wordOne= data.next();
  21.        
  22.         System.out.print("Please enter your second word:");
  23.        
  24.         wordTwo = data.next();
  25.        
  26.         wordT = wordOne + wordTwo;
  27.        
  28.         wordA= wordT.length();
  29.        
  30.        
  31.        
  32.         dot=  (30 - wordA);
  33.  
  34.         System.out.print(wordOne);
  35.        
  36.         while (dot != 0)
  37.            
  38.      {
  39.                
  40.         System.out.print(".");
  41.                
  42.         dot -= 1;
  43.                
  44.      }
  45.         System.out.print(wordTwo);
  46.      }
  47.  
  48. }
Add Comment
Please, Sign In to add comment