You are on page 1of 2

import java.util.

Scanner;
public class Main
{
public static void main(String[] args) {
String d1 = "The 10 Commandments: ";
System.out.print (d1 + "\n" + "\n");
String c1= "I am the Lord your God: you shall not have strange Gods before me.
";
System.out.print ("1. " + c1 + "\n");
String c2= "You shall not take the name of the Lord your God in vain. ";
System.out.print ("2. " +c2 + "\n");
String c3= "Remember to keep holy the Lord's day. ";
System.out.print ("3. " +c3 + "\n");
String c4= "Honor your father and your mother. ";
System.out.print ("4. " +c4 + "\n");
String c5= "You shall not kill. ";
System.out.print ("5. " +c5 + "\n");
String c6= "You shall not commit adultery. ";
System.out.print ("6. " +c6 + "\n");
String c7= "You shall not steal. ";
System.out.print ("7. " +c7 + "\n");
String c8= "You shall not bear false witness against your neighbor. ";
System.out.print ("8. " +c8 + "\n");
String c9= "You shall not covet your neighbor's wife. ";
System.out.print ("9. " +c9 + "\n");
String c10= "You shall not covet your neighbor's goods. ";
System.out.print ("10. " +c10 + "\n" );
String chosen="";
int num=0;
Scanner scan =new Scanner (System.in);
System.out.print ("\n" + "Enter your choice [1-10]: ");
num=scan.nextInt();
int display=0;

if (num==1) {
chosen=c1;
}
else if (num==2) {
chosen=c2;
}
else if (num==3) {
chosen=c3;
}
else if (num==4) {
chosen=c4;
}
else if (num==5) {
chosen=c5;
}
else if (num==6) {
chosen=c6;
}
else if (num==7) {
chosen=c7;
}
else if (num==8) {
chosen=c8;
}
else if (num==9) {
chosen=c9;
}
else if (num==10) {
chosen=c10;
}
System.out.print ("\n" + "Display how many times? ");
display=scan.nextInt();

for (int ctr=display; ctr>=0; ctr--); for (int ctr=1; ctr<=display; ctr++) {
System.out.print (chosen + "\n");
}

}
}

You might also like