汇编语言 两个16进制数相加为什么没有输出结果

code segment
assume cs:code
main:

mov ax,01H
mov dx,02H
add ax,dx
mov ah,0ah  (这里换成mov ah,04ch也不行)
int 21h
code ends

end main

0

2个回答

好的,谢谢啦!是功能号的原因,找到原因了,但是,如果输出数字还不知道怎么解决,只知道输出字符的方法。

0

add ax,dx
这句把ax和dx相加,结果放在ax
mov ah,0ah
这里把0a放在a寄存器的高位上,就把前面计算结果冲掉了。

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
两个16进制数相加怎么做?
两个16进制数相加怎么做?
关于16进制数相加的问题
[size=24px]winform窗体 我在textbox1里输入一个16进制数,比如“EF”,在后台计算它与另两个常量16进制数“01”“81”的和,结果以16进制数形式出现在textbox2里 求指教 怎么写 急等[/size]
16进制数输出问题
CString 的 %x 输出的负数是 ffffffd7 这样的数,怎么能只让他输出后两位d7
输出16进制数和冒泡排序法
Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim s As String Dim yushu As Byte a = 1230: b = 16 While a yushu = a Mod b s = f(yushu) & s a = a \ b Wend Print s End Sub
两个超大的数相加
两个超大的数相加,当数的取值范围已经远远超过long型,可以将他们转化为字符串再相加,代码如下,用到了org.apache.commons.lang3.StringUtils类import org.apache.commons.lang3.StringUtils;public class BigNumberPlus { public static String bigNumberPlus(Str...
两个任意数的相加
DATA SEGMENTrn CR DB 0AH,'$'rn NUM1 DB 100 rn DB ?rn DB 100 DUP(?) rn NUM2 DB 100rn DB ?rn DB 100 DUP(?) rn NUM3 DB 100 DUP(?)rnDATA ENDSrnSTACK SEGMENT rn SAV DB 20 DUP(?)rnSTACK ENDSrnCODE SEGMENT rn ASSUME CS:CODE,DS:DATA,SS:STACK rn BEGIN:MOV AX,DATA rn MOV DS,AXrn INO1:LEA DX,NUM1 rn MOV AH,0AHrn INT 21Hrn MOV SI,DXrn INC SI rn INC SI rn MOV DX,OFFSET CR rn MOV AH,09Hrn INT 21Hrn XOR CX,CXrn MOV AL,0DHrn NEXT:CMP [SI],AL rn JE INO2 rn INC CXrn INC SIrn JMP NEXTrn INO2:LEA DX,NUM2 rn MOV AH,0AHrn INT 21Hrn MOV DI,DXrn INC DI rn INC DIrn MOV DX,OFFSET CR rn MOV AH,09Hrn INT 21Hrn XOR BX,BX rn MOV AL,0DHrn NEXT1:CMP [DI],AL rn JZ SUM rn INC DIrn INC BXrn JMP NEXT1rn SUM:LEA BP,NUM3rn CMP CX,BXrn JGE L1rn PUSH BX rn JMP L2rn L1:PUSH CXrn L2:DEC SIrn DEC DIrn CLC rn PUSHFrn AGAIN:MOV AL,[SI] rn POPFrn ADC AL,[DI] rn AAArn PUSHFrn OR AL,30Hrn MOV [BP],ALrn DEC CXrn DEC BXrn DEC SIrn DEC DIrn INC BPrn CMP CX,0 rn JE PART1 rn CMP BX,0 rn JE PART2rn JMP AGAINrn PART1:CMP BX,0 rn JZ OPUT rn MOV AL,[DI]rn POPFrn ADC AL,0rn AAArn PUSHFrn OR AL,30Hrn MOV [BP],ALrn DEC DIrn INC BPrn DEC BXrn rn JMP PART1rn PART2:CMP CX,0 rn JZ OPUT rn MOV AL,[SI]rn POPFrn ADC AL,0rn AAArn PUSHFrn OR AL,30Hrn MOV [BP],ALrn DEC SIrn INC BPrn DEC CXrn JMP PART2rn OPUT:POPF rn JC SUM1rn JMP OPUT1rn SUM1:MOV BYTE PTR [BP],31Hrn rn INC BPrn POP CXrn INC CXrn JMP RErn OPUT1:POP CX rn RE:MOV DL,[BP-1] rn MOV AH,02Hrn INT 21Hrn DEC BPrn LOOP RErn MOV AH,4CH rn INT 21H rnCODE ENDSrn END BEGINrn运行出来的结果没有错误,但总感觉在输出结果时的循环次数(CX)不太对,可又找不出问题所在。。。。。。。。
在C里面嵌套汇编完成两个16进制数的相加为什么结果不对啊?
代码如下:rnrnrn```rn#include rnrnvoid main()rnrn unsigned char ch,ch1,ch2;rn //BYTE ch,ch1,ch2;rn ch=0x20;rn ch1=0x10;rn _asm mov al,chrn _asm mov bl,ch1rn _asm add al,blrn _asm mov ch2,alrnrn printf("%x",ch2);rnrn```rn最后的输出是10,结果显然不对。。。有没有大佬帮忙解答一下。
为什么没有任何输出结果的?
#include rn#include rn#include rnifstream fin("in.txt");rnrnint main()rnrn int n; //数据个数rn float x,xx; //数据,xx为预测值rn int p; //自回归模型的阶数rn float k;//设定的k值rn float a; //自回归系数rn float mse1=0,mse2=0;//方差,差额小于1%程序结束rn int i,j;rnrn fin>>n;rn for(i=0;i>x;rn fin>>p>>k;rn for(i=0;i>a;rnrn while(1)rn rn mse1=0;rn for(i=p;i0.99 && mse1/mse2<1.01)rn break;rn mse2=mse1;rn rn rn for(i=0;i>n;rnrnrnrnrnrnrn没有任何输出结果,这是怎么回事啊?[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/9.gif][/img]rnC++是刚学的语言,真心受伤!希望各位大虾帮忙,给给意见![img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/16.gif][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/8.gif][/img]
为什么查询结果没有输出?
麻烦高手们帮忙看一下,为什么这个程序只能输出查询到的条数,但是输出不了查询结果啊?rnrn rn rn JSP Pagern rn rn <%rn tryrn String driverName="com.mysql.jdbc.Driver";//驱动程序名rn String userName="javaee";//数据库用户名rn String userPasswd="123456";//密码rn String dbName="drug";//数据库名rn String tableName="clean_drug_like12";//表名rn String url="jdbc:mysql://202.201.14.241/"+dbName+"?user="+userName+"&password="+userPasswd;//连结字符串rn Connection connection;rn Statement statement;rn int RowCount;rn Class.forName(driverName).newInstance();rn connection=DriverManager.getConnection(url);rn statement = connection.createStatement();rn ResultSet rs=null;rn String sql="select count(*) from clean_drug_like12";rn String sql1="select * from clean_drug_like12 limit 1,10";rn rs=statement.executeQuery(sql);rn rs.next();rn RowCount=rs.getInt(1);rn out.println(RowCount);rn rs=statement.executeQuery(sql1);rn out.println(rs.getInt("ID"));rn out.println(rs.getDouble("XLogP"));rn catch(Exception e)rn System.out.println("Exception:"+e.getMessage());rn rn %>rn rnrnrnrn非常感谢!
两个查询结果相加
查询结果一:rnselect QY,CS,avg(convert(float,[N1])) AS N1 from sc_zj_zhcx where QY=QY and CS =CS rnand convert(float,[N1])!=0 group by QY,CSrnrn查询结果二:rnselect QY,CS, avg(convert(float,[N2])) AS N2 from sc_zj_zhcx where QY=QY and CS =CS rnand convert(float,[N2])!=0 group by QY,CSrnrn怎么得到结果 QY,CS,N1,N2
汇编语言实现显示16进制数
将内存单元存储的8个两位16进制数:01H, 25H, 38H, 62H, 8DH, 9AH, BAH,  CEH依次显示在屏幕上。 直接转换。 DATA SEGMENT BUF DB 01H,25H,38H,62H,8DH,9AH,0BAH,0CEH N DW $-BUF X DW 0 DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA STA...
为什么两个字符串相加结果不对?
AnsiString s1,s2;rnrns1 = "aa";rns2 = "BB";rnrns1 = s1 + s2;rnrn本来结果该是 aaBBrn为什么结果是 aarnrn是少包含了什么头文件之类的吗?rn我在同一个工程里的其它Form里面都能正常实现,在这个Form里就是不能实现rn我把能实现的Form中include的东西都拷过来了,还是不能实现。。。。rn
如果整数相加得到16进制数作结果?
int t=32;rnint m=0x(t+3);//是不正确的,那么,t是十进制,想要m是十六进制怎么办?
汇编语言之 两个多位十进制数相加
这是两个多位十进制数相加的汇编语言程序源码。
汇编语言-两个多位十进制数相加
将两个多位十进制数相加,要求被加数、加数均以ASCⅡ码形式各自顺序存放在以DATA1和DATA2为首的五个内存单元中(低位在前),结果送回DATA1处。
汇编语言 两个多位十进制数相加
汇编软件实验 实现了两个5位十进制数的相加 数实现存放在申请内存中
汇编语言两个个位数相加的代码
是关于汇编语言中关于两个个位数相加的和,然后显示
请问怎样输出16进制数
请问怎样把字符串转成16进制并且输出rn使用printf(“%x”,str);可以显示 但是怎样把这个值赋给一个变量,因为我想把转换后16进制的的值写到文件里面rn
[汇编语言]10进制相加,16进制相加及中断显示
我把注释写在代码里,方便理解 两个10进制相加 .MODEL SMALL .STACK 64 .DATA D1 DB 56H,78H D2 DB '56+78=$' D3 DB ? .CODE MOV AX,@DATA MOV DS,AX LEA SI,D1 LEA DI,D3 ;显示字符串 DS:DX LEA ...
两个数相加的结果输出
public class add {  public static void main(String[] args) {   // TODO Auto-generated method stub   int jiashu1 = 10;          //定义加数1   int jiashu2 = 10;          //定义加数2   System.out.println(ji
[请教]VB中16进制数如何相加?
我有一个数组 m_strOutTask(5)里面有6个元素.全部都是16进制数rn1 FF FF FF 1F 2F 3Frn请问如何相加?全部都是16进制数?rn我的意思是求出这6个16进制数的总和rn谢谢~~~
在程序中怎么实现16进制数相加?
例如String str = "b7014e1e";rn怎么实现str分割成b7,01,4e,1e转换成16进制后相加?
两个无穷大的数相加的问题
这是原题, 哪位高手能知道一下啊?rn rnrnrnA + B Problem IIrnTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)rnTotal Submission(s): 11377 Accepted Submission(s): 1904rnrnrnProblem DescriptionrnI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.rnrn rnrnInputrnThe first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line consists of two positive integers, A and B. Notice that the integers are very large, that means you should not process them by using 32-bit integer. You may assume the length of each integer will not exceed 1000.rnrn rnrnOutputrnFor each test case, you should output two lines. The first line is "Case #:", # means the number of the test case. The second line is the an equation "A + B = Sum", Sum means the result of A + B. Note there are some spaces int the equation. Output a blank line between two test cases.rnrn rnrnSample Inputrn2rn1 2rn112233445566778899 998877665544332211rn rnrnSample OutputrnCase 1:rn1 + 2 = 3rnrnCase 2:rn112233445566778899 + 998877665544332211 = 1111111111111111110rn rnrnAuthorrnIgnatius.Lrn rn
为什么输出结果总是后面加上的数?
System.out.println((int)Math.random()*3+2)rn为什么输出的总是2?(输出结果总是后面加上的数)
两个双精度数如何相加!
写一个完整的程序放在代码段C_SEG中,要求把数据段D_SEG中的A rn和附加段E_SEG中的B相加,并把结果存放在D_SEG中的SUM中.其中AUGEND,ADDEND和SUM均为双精度数,AUGEND赋值为99251,ADDEND赋值为-15962rnrnrnd_segsegmentrnA DD 99251rnsumdt?rnd_segendsrnrne_segsegmentrnB DD -15962rne_segendsrnrnc_segsegmentrnassume cs:c_seg,ds:d_seg,es:e_segrnstart:rnpush dsrnsub ax,axrnpush axrnrnmov ax,d_segrnmov ds,axrnmov ax,e_segrnmov es,axrnrnfinitrnfild Arnfild Brnfaddrnfbstp sumrnrnretfrnc_segendsrnendstartrnrn以上不用浮点数,用AX,DX……怎么编?rnrnAX可以存入双精度数时,数据段内如何存放,会将多于16位的值自动放入BX中吗?rn
两个float数相加的问题?
float a=-3.4f;rnfloat b=3.0f;rnout.print(a+b);rnrnrn在网页中运行后,其结果不是等于 -0.4 的,请问怎么才能的到这个结果啊?rn
两个五百位的数相加(数组)
让两个五百位的数相加,得到其结果。有了此代码,让两个五百位的数相见减,相除,相乘都有了希望。我终于把相加弄出来了,其它的应该差不多,估计除法会比较难!
汇编语言使用宏,实现两个字节压缩BCD数相加
汇编语言使用宏,实现两个字节压缩BCD数相加 实验原理: BCD码有两种形式,即压缩BCD码和非压缩BCD码。压缩BCD码用4位二进制数表示一位十进制数,一个字节表示两位十进制数,如:96D表示成 1001 0110B=96H。 算法思想:将2字节的BCD码分为2个单字节数相加,从低字节开始,进行2次循环操作,注意每次相加后必须进行BCD修正。 实验步骤: 1、使用记事本等编辑软件编写程序源代码...
两个链表相加 结果不对
就是两个多项式相加,幂数高的在前相等的相加,一正一负的相减,最后按幂数的高低输出结果正确的结果是 rn6 rn7 rn7 rn4 rn5 rn1 rn7 rn0 rn这个链表 rnrnrn#include rn#include rnrnusing namespace std; rnstruct itm rn rn int a; rn int m; rn itm *next; rn; rnitm *insert1() rn rn itm *p,*first,*pp; rn p=NULL; rn first=p; rn int a1[4]=6,-4,2,7; rn int m1[4]=5,3,1,0; rn for(int i=0;i <=3;i++) rn rn p=new itm; rn if(first==NULL) first = p; rn else pp->next = p; rn p->a=a1[i]; rn p->m=m1[i]; rn p->next = NULL; rn pp = p; rn rnrn return first; rn rnitm *insert2() rn rn itm *q,*second,*pq; rn q=NULL; rn second=q; rn int a2[3]=7,8,3; rn int m2[3]=4,3,1; rn for(int j=0;j <=2;j++) rn rn q=new itm; rn if(second==NULL) second = q; rn else pq->next = q; rn q->a=a2[j]; rn q->m=m2[j]; rn q->next = NULL; rn pq = q; rn rnrn return second; rn rnitm *slect(itm *&m,itm *&n) rn rn itm *p,*q,*phead,*qhead; rn phead=m; rn qhead=n; rn p=phead; rn q=qhead; rn while(q!=NULL) rn rn if(p->m>q->m) rn rn phead=p; rn p=p->next; rn rn if(p->m m) rn rn if(phead->m m) rn rn qhead->next=phead; rn phead=qhead; rn qhead=p->next; rn delete qhead; rn rn else rn rn phead->next=q; rn q=p; rn q=q->next; rn delete q; rn rn rn if(p->m==q->m) rn rn if(p->a+q->a==0) rn rn phead->next=p->next; rn delete p; rn q=q->next; rn delete q; rn rn else rn rn p->a=(p->a+q->a); rn q=q->next; rn delete q; rn rn rn return phead; rn rn rnvoid print(itm *phead) rn rn itm *r=phead; rn while(r!=NULL) rn rn cout < a < m < next; rn rn rnint main(int argc, char *argv[]) rn rn itm *p,*q,*r; rn p=insert1(); rn q=insert2(); rn r=slect(p,q); rn print(r); rn rn system("PAUSE"); rn return 0; rn
没有错误为什么数不出来结果啊?
[code=C/C++][/code]#includernusing namespace std;rnint main()rnint s,i,n,m;rnint k[11];rnfor(m=2;m<=1000;m++)rnn=0;rns=m;rnfor(i=1;i<=m;i++)rnif(m%i==0) n++;s=s-i;k[n]=i;rnif(s==0)rncout<rnusing namespace std;rnint main()rnint s,i,m;rn for( m=2;m<=1000;m++)rn s=0;rn for(i=1;i<=m;i++)rn if((m%i)==0) s=s+i;rn if(s==m) rn cout<
汇编 10进制数转16进制数 为什么不能正常输出结果 救我~~~~
题目要求 输入数字字符串 :901652871234rnrnINBUF N(容量) outbuf 0110 0001 0000 1001 rn x 0111 1000 0010 0101rn 9 0100 0011 0010 0001rn 0rn 1rn 6rn 5 输出 4321rn 2 8765rn 8 2109rn 7rn 1rn 2rn 3rn 4rnrnrnrnAA SEGMENTrn INBUF DB 6,?,6 DUP(?)rn OUTBUF DB 6,?,6 DUP(?)rn MSG1 DB 'INPUT A DECIMAL INTEGER:$'rnAA ENDSrnrn CC SEGMENTrn ASSUME DS:AA,CS:CCrnrn START: MOV AX,AArn MOV DS,AXrn MOV DX,OFFSET MSG1rn CALL DSPMESSrn MOV DX,OFFSET INBUFrn MOV AH,0AHrn INT 21Hrn CALL CRLFrnrn LEA DI, OUTBUFrn LEA SI, INBUF+2rn LOOP2: CMP SI,'$'rn JZ A1rn CALL DTOBINrn XOR AH,AHrn AND AL,0FHrn ADD DI,AXrn INC SIrn CMP SI,'$'rn JZ A1rn CALL DTOBINrn XOR AH,AHrn AND AL,0FHrn MOV CL,4rn SHL AL,CLrn ADD DI,AXrn INC SIrn CMP SI,'$'rn JZ A1rn CALL DTOBINrn XOR AH,AHrn AND AL,0FHrn MOV CL,8rn SHL AX,CLrn ADD DI,AXrn INC SIrn CMP SI,'$'rn JZ A1rn CALL DTOBINrn XOR AH,AHrn AND AL,0FHrn MOV CL,12rn SHL AX,CLrn ADD DI,AXrn INC DIrn INC SIrn JMP LOOP2rnrn A1: MOV DI,'$'rn LEA DI,OUTBUFrn JMP LOOP4rnrn LOOP4: MOV BX,DIrn CALL BINTOHEXrn INC DIrn CMP DI,'$'rn JZ A2rn JMP LOOP4rnrn A2: MOV AX,4C00Hrn INT 21Hrn DTOBIN PROCrn PUSH SIrn PUSH CXrn PUSH DXrn XOR AX,AXrn MOV CL,[SI]rnrn XOR CH,CHrn JCXZ DTOBIN2rn DTOBIN1:MOV DX,10rn MUL DXrn MOV DL,[SI]rnrn AND DL,0FHrn XOR DH,DHrn ADD AX,DXrn LOOP DTOBIN1rn DTOBIN2:POP DXrn POP CXrn POP SIrn RETrn DTOBIN ENDPrn BINTOHEX PROCrn MOV CH,4rn ROTATE: MOV CL,4rn ROL BX,CLrn MOV AL,BLrn AND AL,0FHrn ADD AL,30Hrn CMP AL,3AHrn JL PRINTrn ADD AL,7Hrn PRINT:MOV DL,ALrn MOV AH,2rn INT 21Hrn DEC CHrn JNZ ROTATErn RETrn BINTOHEX ENDPrn CRLF PROCrn PUSH AXrn PUSH DXrn MOV DL,0DHrn MOV AH,2rn INT 21Hrn MOV DL,0AHrn MOV AH,2rn INT 21Hrn POP DXrn POP AXrn RETrn CRLF ENDPrn DSPMESS PROCrn PUSH AXrn MOV AH,9rn INT 21Hrn POP AXrn RETrn DSPMESS ENDPrn CC ENDSrn END STARTrnrn为什么这样不行啊 救命啊~~~
为何输出double数值结果却是16进制数
[u]#include rnusing namespace std;rndouble Average(double dbGradeList[],int nLength)rnrn double sum = 0;rn for(int i = 0;idbGradeList[i])rn rn tem = dbGradeList[i];rn rn rn return tem;rnrnrnrnint main(int argc,char* argv[])rnrn double dbGradeList[] = 87.4,98.8,56,78.8,68.5,91.0,74.9,89.0;rn int nLength = sizeof(dbGradeList)/sizeof(double);rn double dbAverage = Average(dbGradeList,nLength);rn double dbMaxGrade = MaxGrade(dbGradeList,nLength);rn double dbMinGrade = MinGrade(dbGradeList,nLength);rn cout<<"平均成绩 "<
为什么该程序没有输出结果呢
#include rnmain()rnchar *p="abcd";rnchar *q=p;rnrnprintf("%c,%c",*p++,++*q);rn
汇编 实现两个16进制相加的代码
汇编 实现两个16进制相加的代码 如 输入: AAAA 1111 输出: BBBB
最简单的php为什么没有输出结果
rn rn rn Hello World ! rn rn rn rn rnrnrnrn就是这么一个简单的php文件,为什么没有显示出结果!没接触过php想试试,不知道为什么不行!
为什么这样实例话没有输出结果
public class EO3_ObjectReference rn EO2_OverLoadedContructor[] array=new EO2_OverLoadedContructor[5];rn public EO3_ObjectReference() rn// new EO2_OverLoadedContructor();rn// new EO2_OverLoadedContructor();rn// new EO2_OverLoadedContructor();rn// new EO2_OverLoadedContructor();rn// new EO2_OverLoadedContructor();rn for(int i=0;array.length<5;i++)rn array[i]=new EO2_OverLoadedContructor();rn rn // 构造五个EO2的实例rn rn public EO3_ObjectReference(String s)rn for(int i=0;array.length<5;i++)rn array[i]=new EO2_OverLoadedContructor(s);rn rn rn /**rn * @param argsrn */rn public static void main(String[] args) rn rn // TODO Auto-generated method stubrn new EO3_ObjectReference();rn rn new EO3_ObjectReference("OverLoaded");rn rnrnrnrnpublic class EO2_OverLoadedContructor rn public EO2_OverLoadedContructor()rn System.out.println("Default Contructor");rn rn public EO2_OverLoadedContructor(String s)rn this();rn System.out.println(s);rn rn /**rn * @param argsrn */rn public static void main(String[] args) rn // TODO Auto-generated method stubrn new EO2_OverLoadedContructor();rn new EO2_OverLoadedContructor();rn new EO2_OverLoadedContructor("OverLoaded");rn rnrnrn
输出结果为什么没有对齐呢?
[code=C/C++]rn#includern#define N 5rnrnstruct studentrnrn char no[9];rn char name[10];rn int chinese,math,english; rn stu[N];rnrnint main(void)rnrn FILE* fp;rn int i;rn int sum;rn if((fp=fopen("results.txt","rt"))==NULL)//是否正常打开rn rn printf("文件打开错误!!\n");rn //getch();rn exit(1); rn rn rn i=0;rn while(!feof(fp))//检测文件结束rn rn fscanf(fp,"%s%s%d%d%d\n",stu[i].no,stu[i].name,&stu[i].chinese,rn &stu[i].math,&stu[i].english);rn ++i;rn rn rn printf("学号\t\t姓名\t语文\t数学\t英语\t总分\t平均分\n");rn for(i=0;i
关于线程的-----为什么没有任何输出结果?
1. public class A extends Thread rn2. A() rn3. setDaemon(true);rn4. rn310 - 035rnLeading the way in IT testing and certification tools, www.testking.comrn-60 -rn5.rn6. public void run() rn7. (new B()).start();rn8. try rn9. Thread.sleep(60000);rn10. catch (InterruptedException x) rn11. System.out.println(“A done”);rn12. rn13.rn14. class B extends Thread rn15. public void run() rn16. try rn17. Thread.sleep(60000);rn18. catch (InterruptedException x) rn19. System.out.println(“B done”);rn21. rn22. rn23.rn24. public static void main(String[] args) rn25. (new A()).start();rn26. rn27.
我的这个程序为什么输出没有结果?
#includernusing namespace std;rn#includerntypedef struct stondernrn char data;rn struct stonde *next;rnStacknode;rnint ishw(char str[])rnrn int i=0;char ch;rn Stacknode *st=NULL,*p;rn while((ch=str[i++])!='\0')rn rn p=(Stacknode *)malloc(sizeof(Stacknode));rn p->data=ch;rn p->next=st;rn st=p;rn rn i=0;rn while(st!=NULL)rn rn p=st;rn ch=p->data;rn st=st->next;rn free(p);rn if(ch!=str[i++])rn return 0;rn rn return 1;rnrnint main()rnrn char str[]="abcdcba";rn int ishw(char str[]);rn
不知道为什么没有输出i*j的结果
#includern#define COL 10rn#define ROW 10rnint **fun(int col,int row)rnrn int **p = new int *[ROW];rn int i,j;rn for(i = 0; i < col; i ++)rn for(j = 0; j < row; j ++)rn rn p[i] = new int [COL];rn p[i][j] = i*j;rn rn return p;rnrnvoid main()rnrn int **p = fun(4,4);rn for(int i = 0; i < 4; i ++)rn for(int j = 0; j < 4; j++)rn cout << p[i][j]<<"\t"<
相关热词 c#异步发送kafka c#窗体编号 c# 操作二进制文件 c# 反射 机制 c#线程 窗体失去响应 c#角度转弧度 c# 解析gps数据 c# vs设置 语法版本 c# json含回车 c#多线程demo