You are on page 1of 1

class Assignment4

{
public static void main(String [] args )
{
String a ="QWERTYUIOPLKJHGFDSAZXCVBNM";
String b = "poiuytrewqasdfghjklmnbvcxz";
String c ="1234567890";

String op = "";

for(int i=1;i<2;i++)
{
int ab = (int ) (Math.random()*(a.length()));
int bc = (int)(Math.random()*(b.length()));
int cd = (int) (Math.random()*(c.length()));

char d=a.charAt(ab);
char m=a.charAt(ab);

char e=b.charAt(bc);
char n=b.charAt(bc);

char f=c.charAt(cd);
char o=c.charAt(cd);

op=op+d+m+e+n+f+o;

}
System.out.println("\ncaptcha with two concecutive caps,small and
no.");
System.out.print(op);

System.out.println("\n");

String opfinal ="";


for(int j=1;j<7;j++)
{
int az= (int) (Math.random()*(op.length()));

char finalcp = op.charAt(az);


opfinal = opfinal + finalcp;
}

System.out.println("final shuffeled captcha\n"+opfinal);


}
}

You might also like