package bishi;
import java.util.Random;
public class Rand5toRand7 {
public static void main(String[] args) {
for(int i=0;i<100;i++)
{
System.out.println(rand7());
}
}
static Random rand=new Random();
public static int rand5()
{
return rand.nextInt(5)+1;
}
public static int rand7()
{
int x=22;
while(x>21)
{
x=(rand5()-1)*5+rand5();
}
return x%7+1;
}
}