Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class AstroProject{
- public static void main (String []args){
- Scanner input = new Scanner(System.in);
- System.out.println("Could you give me your astrological sign?");
- String astro = input.nextLine();
- System.out.println("Could you give me your favorite fruit?");
- String fruit = input.nextLine();
- System.out.println("Could you give me a 2 digit number?");
- int year = input.nextInt();
- int astrolength = astro.length();
- int fruitlength = fruit.length();
- String astro2 = astro.substring(astrolength/2);
- String fruit2 = fruit.substring(fruitlength/2);
- String pass = astro2+fruit2+year;
- System.out.println("Your new password is: " + pass);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement