public static void main(String[] args) {
for(int i=1; i<=50; i++){
StringBuilder sb = new StringBuilder();
for(int j=0; j<=i; j++){
sb = sb.append("=");
}
sb.append(">");
for(int s=50-i; s>=1; s--){
sb = sb.append(" ");
}
sb.append(i +"百分之");
System.out.printf(sb.toString());
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.printf("\r");
}
System.out.println( );
}
运行结果