Assignemnt #56 - Treat
Code
/// Name: Caelan Dorstad
/// Period: 6
/// Program Name: Treat
/// File Name: Treat.java
/// Date Finished: 10/30/2015
import java.util.Random;
public class cookie{
public static void main(String[] args){
Random r = new Random();
int num = 1 + r.nextInt(54), num1 = 1 + r.nextInt(54), num2 = 1 + r.nextInt(54), num3 = 1 + r.nextInt(54), num4 = 1 + r.nextInt(54), num5 = 1 + r.nextInt(54), num6 = 1 + r.nextInt(54);
System.out.println("Fortune cookie says: \"Stick with your friend.\"");
System.out.println();
System.out.println( num + " - " + num1+ " - " + num2 + " - " + num3 + " - " + num4 + " - " + num5);
}
}
Picture of the output