Skip to main content
Loading...

More Java Posts

public class Daedalus extends Athenian
{
	private Story story;
	public ArrayList<Skill> skills = new ArrayList<Skill>();
	public ArrayList<Athenian> children = new ArrayList<Athenian>();
	
	public Daedalus(Story story, ArrayList<Skill> inherentSkills)
	{
	if(story != null)
	System.out.println("ERROR No one is created with a story.");

	skills.add(inherentSkills);
	}

	public Momento advanceStory(Scene s)
	{
	System.err.println("ERROR Don't know how to proceed...");
	}
}


//██╗  ░█████╗░███╗░░░███╗  ██████╗░░█████╗░███████╗██████╗░░█████╗░██╗░░░░░██╗░░░██╗░██████╗
//██║  ██╔══██╗████╗░████║  ██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗██║░░░░░██║░░░██║██╔════╝
//██║  ███████║██╔████╔██║  ██║░░██║███████║█████╗░░██║░░██║███████║██║░░░░░██║░░░██║╚█████╗░
//██║  ██╔══██║██║╚██╔╝██║  ██║░░██║██╔══██║██╔══╝░░██║░░██║██╔══██║██║░░░░░██║░░░██║░╚═══██╗
//██║  ██║░░██║██║░╚═╝░██║  ██████╔╝██║░░██║███████╗██████╔╝██║░░██║███████╗╚██████╔╝██████╔╝
//╚═╝  ╚═╝░░╚═╝╚═╝░░░░░╚═╝  ╚═════╝░╚═╝░░╚═╝╚══════╝╚═════╝░╚═╝░░╚═╝╚══════╝░╚═════╝░╚═════╝░
import java.util.Scanner;

/* In Heaven, the seed is tall and the oak small / It's input vital 
	* "The al-Madinatian," verse 236-37 
	* tinyurl.com/17snqkfv
	* email answer to [email protected]
	**/

public class Main
{
	public static void main(String args[])
	{
		int x = 0;
		int a, c, m = 10000;
		
		Scanner in = new Scanner(System.in);
		
		System.out.println("Please enter a seed, maximum 3000000:");
		x = in.nextInt();
		
		System.out.println("Please input a number, maximum 29:");
		a = in.nextInt();
		
		System.out.println("Please input a number, maximum 999999:");
		c = in.nextInt();
		
		char menu = 'y';
		while(menu != 'n')
		{
			x = (a*x + c) % m;
			
			System.out.println("The next number is " + x + "\nWould you like another? (y/n)");
			menu = in.next().charAt(0);
		}
	}
}

//██╗  ░█████╗░███╗░░░███╗  ██████╗░░█████╗░███████╗██████╗░░█████╗░██╗░░░░░██╗░░░██╗░██████╗
//██║  ██╔══██╗████╗░████║  ██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔══██╗██║░░░░░██║░░░██║██╔════╝
//██║  ███████║██╔████╔██║  ██║░░██║███████║█████╗░░██║░░██║███████║██║░░░░░██║░░░██║╚█████╗░
//██║  ██╔══██║██║╚██╔╝██║  ██║░░██║██╔══██║██╔══╝░░██║░░██║██╔══██║██║░░░░░██║░░░██║░╚═══██╗
//██║  ██║░░██║██║░╚═╝░██║  ██████╔╝██║░░██║███████╗██████╔╝██║░░██║███████╗╚██████╔╝██████╔╝
//╚═╝  ╚═╝░░╚═╝╚═╝░░░░░╚═╝  ╚═════╝░╚═╝░░╚═╝╚══════╝╚═════╝░╚═╝░░╚═╝╚══════╝░╚═════╝░╚═════╝░