下列程序从标准输入设备——键盘读入一个字符,然后再输出到屏幕。要想完成此功能,画线处应该填入的语句为( )。 import java.io.*; public class Test { public static void main(String args[]) { char ch; try { ______; System.out.println(ch); } catch(IOException e) { e.printStackTrace(); } } }A.ch=System.in.read();B.ch=(char)System.in.read();C.ch=(char)System.in.readln();D.ch=(int)System.in.read();

下列程序从标准输入设备——键盘读入一个字符,然后再输出到屏幕。要想完成此功能,画线处应该填入的语句为( )。 import java.io.*; public class Test { public static void main(String args[]) { char ch; try { ______; System.out.println(ch); } catch(IOException e) { e.printStackTrace(); } } }

A.ch=System.in.read();

B.ch=(char)System.in.read();

C.ch=(char)System.in.readln();

D.ch=(int)System.in.read();


相关考题:

编写程序maxprog完成如下要求:从键盘输入15个数,然后找出其中的最大的数和最小的数,将它们输出到屏幕上(其中最大数和最小数分别定义变量名为max和min)。

下列程序从标准输入设备--键盘读入-个字符,然后输出到屏幕。要想完成此功能,画线处应该填入的语句为( )。A.ch=System.in.read( );B.ch=(char)System.in.read( );C.ch=(char)System.in.readln( );D.ch=(int)System.in.read( );

下列程序从标准输入设备—键盘诗篇一个字符,然后再输出到屏幕。要想完成此功能,画线处应该填入的语句为( )。 impoajava.io.*; publicclassTest { publicstaticvoidmain(Stringargs[]) { charch; try { ______, System.out.println(Ch); } catch(IOExceptione) { e.printStackTrace(); } } }A.ch=System.in.read();B.ch=(char)System.in.read();C.ch=(char)System.in.readln();D.ch=(int)System.in.read();

下列程序从标准输入设备——键盘读入一个字符,然后输出到屏幕。要想完成此功能,画线处应该填人的语句为( )。 importjava.iO.*; public class Test { public static void main(String argsE]) { charch: try { ___; System.out.println(eh); } catch(IOException e) { e.printStackTrace: } } }A. ch=System.in.read:B.ch=(char)System.in.read:C.ch=(char)System.in.readln:D.ch=(int)System.in.read;

标准输入流是指从标准输入设备(键盘)流向程序的______.

以下叙述中错误的是():A.getchar函数用于从磁盘文件读入字符。B.gets函数用于从标准输入输出设备读入字符串。C.fputs函数用于把字符串输出到文件。D.fwrite函数用于以二进制形式输出数据到文件。

请编写Python程序完成以下要求: 提示用户从键盘上输入一个摄氏温度,在屏幕上输出该摄氏温度对应的华氏温度。 (得分点提示:程序的可读性、是否有注释、功能是否正确、输入输出是否有提示信息)

编写代码:键盘输入一个英文字母(大小写形式随意),程序将该输出的字符改为小写形式输出到屏幕(若输入时即为小写形式即不做改动)。

20、下列描述中,正确的是()。A.cin对应标准输入流,用于从键盘读取数据B.cout对应标准输出流,用于从键盘读取数据C.cout对应标准输入流,用于将数据输出到屏幕上D.cin对应标准输出流,用于将数据输出到屏幕上