⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch4ex6.java

📁 JAVA程序设计 丁岳伟 彭敦陆编著 高等教育出版社示例代码可供JAVA初学者学习
💻 JAVA
字号:
public class ch4ex6{
	public static void main(String[]args){
		char ch1,ch2,ch3;
		System.out.print("Enter first character:");
		ch1=Keyboard.readChar();
		Keyboard.skipLine();
		System.out.println();
		System.out.print("Enter second character:");
		ch2=Keyboard.readChar();
		Keyboard.skipLine();
		System.out.println();
		System.out.print("Enter third character:");
		ch3=Keyboard.readChar();
		System.out.println();
		//sort value
		if(ch1>ch2)
			;
		else{
			char temp;
			temp=ch1;
			ch1=ch2;
			ch2=temp;
		}
		if(ch1>ch3)
			;
		else{
			char temp;
			temp=ch1;
			ch1=ch3;
			ch3=temp;
		}
		if(ch2>ch3)
			;
		else{
			char temp;
			temp=ch2;
			ch2=ch3;
			ch3=temp;
		}
		System.out.print("Sorted:");
		System.out.println(ch1);
		System.out.println(ch2);
		System.out.println(ch3);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -