Advertisement
Guest User

Bigram Character

a guest
Feb 21st, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class bigramCharacter
  4. {
  5.  
  6. public static void main(String[] args)
  7. {
  8. Scanner input = new Scanner(System.in);
  9.  
  10. System.out.print("Please enter word: ");
  11. String word = input.next();
  12.  
  13.  
  14. //System.out.print(word.charAt(0));
  15. for (int i = 0; i < word.length() -1; i++)
  16. {
  17. System.out.print(word.charAt(i));
  18. System.out.print(word.charAt(i+1));
  19. System.out.println();
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement