问题详情

使用VC6打开考生文件夹下的源程序文件modi1.cpp。本程序要求输入一字符串,然后将其中的小写字母改变成大写字母,字符可能输入多行,当输入字符“?”时,默认字符输入结束,最后把结果输出到界面。  注意:不要改动main函数,不能增行或删行,也不能更改程序的结构,错误的语句在∥******error******的下面。  

相关专题: 大写字母  

未搜索到的试题可在搜索页快速提交,您可在会员中心"提交的题"快速查看答案。 收藏该题
查看答案

相关问题推荐

[单选]关于交流电参数的表示,()说法。
A.瞬时值常用大写字母表示,有效值常用小写字母表示
B.瞬时值常用小写字母表示,有效值常用大写字母表示
C.瞬时值和有效值都常用小写字母表示
D.瞬时值和有效值都常用大写字母表示

在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是()。

A.Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii<65 Or KeyAscii>90 Then

MsgBox "请输入大写字母"

KeyAscii=0

End If

End Sub

B.Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode <65 Or KeyCode>90 Then

MsgBox "请输入大写字母"

KeyCode=0

End If

End Sub

C.Private Sub Text1_MouseDown(Button As Integer,_

Shift As Integer, X As Single, Y As Single)

If Asc(Text1.Text) <65 Or Asc(Text1.Text) >90 Then

MsgBox "请输入大写字母"

End If

End Sub

D.Private Sub Text1_Change()

If Asc(Text1.Text) >64 And Asc(Text1.Text) <91 Then

MsgBox "请输入大写字母"

End If

End Sub

在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是

A.Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii < 65 Or KeyAscii > 90 Then MsgBox "请输入大写字母" KeyAscii = 0 End If End Sub

B.Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode < 65 Or KeyCode > 90 Then MsgBox "请输入大写字母" KeyCode = 0 End If End Sub

C.Private Sub Text1_MouseDown(Button As Integer,_ Shift As Integer, X As Single, Y As Single) If Asc(Text1.Text) < 65 Or Asc(Text1.Text) > 90 Then MsgBox "请输入大写字母" End If End Sub

D.Private Sub Text1_Change() If Asc(Text1.Text) > 64 And Asc(Text1.Text) < 91 Then MsgBox "请输入大写字母" End If End Sub

[单项选择题]在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是______。
A.PrivateSubText1_KeyPress(KeyAsciiAsIntegeIfKeyAscii<65OrKeyAscii>90ThenMsgBox“请输入大写字母”KeyAscii=0EndIfEndSub
B.PrivateSubText1_KeyDown(KeyCodeAsInteger,ShiftAsIntegeIfKeyCode<65OrKeyCode>90ThenMsgBox“请输入大写字母”KeyCode=0EndIfEndSub
C.PrivateSubText1MouseDown(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingl,IfAsc(Text1.Tex<65OrAsc(Text1.Tex>90ThenMsgBox“请输入大写字母”EndIfEndSub
D.PrivateSubText1_Change()IfAsc(Text1.Tex>64AndAsc(Text1.Tex<91ThenMsgBox“请输入大写字母”EndIfEndSub

请完成下列Java程序:对大写的26个英文字母加密,从键盘输入一个大写字母串,输出这个串加密后的结果。加密操作是将字母变换成倒序的大写字母,如A->Z,B->Y。

注意:请勿改动main()主方法和其他已有语句内容,仅在下划线处填入适当的语句。

程序运行结果如下:

输入一个大写字母串:ADFSDFFE

加密后的大写字母串:ZWUHWUUV

import java.io.*;

public class ex12_2{

public static void main (String[] args){

char ch = 'A';

String str;

System. out .print ( "输入一个大写字母串: ");

try{

BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

str= in.readLine();

System. out .print ( "加密后的大写字母串:");

for(int i=0;i<str.length();i++){

_______________;

_______________;

System.out.print(ch);

}

}catch(IOException e){}

try{

System.in.read();

}catch(IOException e) {};

}

}

联系客服 会员中心
TOP