📄 appabc.java
字号:
import java.io.*;
public class AppAbc
{
public static void main(String args[])
{
char s[];
char a=' ';
int count=-1;
s = new char[50];
try
{
System.out.println("请输入字符");
do
{
a = (char)System.in.read();
count++;
s[count]=a;
System.in.skip(2);
}while (a!='#');
System.out.println("您输入了"+(count)+"个字符");
int b[] = new int[count];
char Min=s[0];
int j=0;
for(;j<count;j++)
{
if(Min>s[j])Min=s[j];
System.out.println(s[j]);
}
System.out.println("字母顺序最小的是"+Min);
}catch(IOException e ){};
}
}
// System.out.println("您输入的第"+(count+1)+"个字符是"+c);
//@@@@@循环输入单个字符01
// do
// {
// a = (char)System.in.read();
// count++;
// System.in.skip(2);
// }while (a!='#');
//@@@@@循环输入单个字符02
// System.out.println("请输入字符");
// c = (char)System.in.read();
// while (c!='#')
// {
// a = (char)System.in.read();
// c = a;
// count++;
// s[count]=a;
// System.in.skip(2);
// }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -