SHARE
TWEET

Untitled

a guest Aug 20th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         String UDToMetod = "";
  6.         Scanner UserData = new Scanner(System.in);
  7.         UDToMetod = UserData.nextLine();
  8.         System.out.println(Finder(UDToMetod));
  9.     }
  10.  
  11.     private static String Finder(String UserData) {
  12.         int CharV = 0, i = 0;
  13.         String resulest = ("");
  14.         CharV = UserData.toLowerCase().indexOf('з');
  15.         if (UserData.toLowerCase().charAt(CharV+1) == 'о' & UserData.toLowerCase().charAt(CharV+2) == 'ж' ){
  16.             for (i = -3; i < 3; i++) {resulest += Character.toString(UserData.charAt(CharV+i));}
  17.                 if (resulest.toLowerCase().charAt(0) == 'н' || resulest.toLowerCase().charAt(1) == 'н' & resulest.toLowerCase().charAt(1) == 'е' || resulest.toLowerCase().charAt(2) == 'е' ){resulest = ("Не зож");}
  18.                 else {resulest = "Зож";}
  19.         }
  20.         else {resulest = "Notihing found";}
  21.  
  22.  
  23.         return resulest;
  24.     }
  25.  
  26.  
  27.  
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top