View Single Post
  #2 (permalink)  
Old 05-23-2008, 06:18 PM
radtad82 radtad82 is offline
Member
 
Join Date: May 2008
Posts: 2
radtad82 is on a distinguished road
int day = (int)(Math.random() * 7) + 1; //random# from 1 to 7
//go backwards
for (int i=day; i>=1; i--){
System.out.println(fullNameofDay(i));
}
for (int i=7; i>=day+1; i--){
System.out.println(fullNameofDay(i));
}
//go forwards
for (int i=day; i<=7; i++){
System.out.println(abbrDay(i));
}
for (int i=1; i<day; i++){
System.out.println(abbrDay(i));
}

Hopefully that should point you in the right direction
Reply With Quote