Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class _06_Extract_Tags {
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.  
  7.         while (true) {
  8.             String curent = scan.nextLine();
  9.  
  10.             if (curent.equals("END")) {
  11.                 break;
  12.             }
  13.             if (curent.length() < 3 || curent.length() > 16) {
  14.                 System.out.printf("invalid\n");
  15.             } else {
  16.                 System.out.printf("valid\n");
  17.             }
  18.  
  19.  
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement