import java.util.Scanner;
public class ASCII {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String s;
char c;
while(true){
System.out.println("insert letters. (insert # exit)");
s = scan.next();
c = s.charAt(0);
if(c == '#')
break;
System.out.print(c + " ASCII code " + (int)c + "end");
}
scan.close();
}
}
i want to change while to do~while and while to for. i tried it but i don't know how to change the if part.