Professional Documents
Culture Documents
Şi̇fre Yapisi
Şi̇fre Yapisi
import java.util.Scanner;
int asciiPwCounter,nopwctr;
do{
asciiPwCounter=0;
nopwctr=0;
System.out.println("Yukarıdaki Sanal Klavyeye Göre ve");
System.out.println("8 haneli en az iki hanesi Harf olcak şekilde");
System.out.print("Lütfen Şifre giriniz: ");
Pw=enter.next();
if (Pw.length()!=8){
System.out.println("--|->Şifre Hatalı tekrar giriniz");
}
for ( i = 0; i <Pw.length() ; i++) {
if((int) Pw.charAt(i)<48 || (int) Pw.charAt(i)>122) nopwctr++;
}
if(nopwctr!=0) System.out.println("--|->Şifre Hatalı tekrar giriniz");
}
while (Pw.length()!=8 || nopwctr!=0 || asciiPwCounter<2 );