Created
          November 13, 2013 23:56 
        
      - 
      
- 
        Save pepet96/7458740 to your computer and use it in GitHub Desktop. 
    CountingLetters
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.Scanner; | |
| public class CountingLetters { | |
| public static void main (String [] args) { | |
| Scanner input = new Scanner(System.in); | |
| System.out.println("Enter first word: "); | |
| String primero = input.next(); | |
| System.out.println("Enter second word: "); | |
| String segundo = input.next(); | |
| String fin = primero + "" + segundo; | |
| int len = fin.length(); | |
| int dotlen = 0; | |
| if(len<=30) dotlen = 30-len; | |
| String strdot=""; | |
| for(int i=1;i<=dotlen;i++) strdot+="."; | |
| System.out.println("Output String : " +primero+strdot+segundo); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment