Assignment 56
import java.util.Random;
public class FortuneCookie
{
public static void main ( String[] args )
{
Random r = new Random();
int fortune = 1 + r.nextInt(7);
int num1 = 1 + r.nextInt(54);
int num2 = 1 + r.nextInt(54);
int num3 = 1 + r.nextInt(54);
int num4 = 1 + r.nextInt(54);
int num5 = 1 + r.nextInt(54);
int num6 = 1 + r.nextInt(54);
String response = "";
if ( fortune == 1 )
response = "Many oppurtunites will open up for you.";
else if ( fortune == 2 )
response = "Now is the time to take chances.";
else if ( fortune == 3 )
response = "Proceed with caution.";
else if ( fortune == 4 )
response = "Make your next first impression a good one.";
else if ( fortune == 5 )
response = "Do not give up on your endeavors.";
else if ( fortune == 6 )
response = "Keep your friends close.";
else if ( fortune == 7 )
response = "Listen for advice from trusted friends.";
else
response = "( ͡° ͜ʖ ͡°)";
System.out.println( "Fortune cookie says: \"" + response + "\"\n\t" + num1 + " -- " + num2 + " -- " + num3 + " -- " + num4 + " -- " + num5 + " -- " + num6);
}
}