Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class EX3
- {
- /**
- * @Alexander Grob CS 2011
- */
- public static void main(String[] args)
- {
- Scanner data = new Scanner(System.in);
- String wordT;
- String wordOne,wordTwo;
- int wordA;
- int dot;
- System.out.print("Please enter your first word:");
- wordOne= data.next();
- System.out.print("Please enter your second word:");
- wordTwo = data.next();
- wordT = wordOne + wordTwo;
- wordA= wordT.length();
- dot= (30 - wordA);
- System.out.print(wordOne);
- while (dot != 0)
- {
- System.out.print(".");
- dot -= 1;
- }
- System.out.print(wordTwo);
- }
- }
Add Comment
Please, Sign In to add comment