本文主要是介绍5. 4 二重循环将二维数组的某列、某矩形转大写,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
5. 4 二重循环将二维数组的某列、某矩形转大写
1. 把每一行的b都变成大写
assume cs:codesg,ds:data,ss:stack
data segmeNTstr db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc','$'
data endsstack segmentdb 10 dup(0)
stack endscodesg SEgmentstart:mov ax,datamov ds,axmov bx,0mov cx,4for:mov al,ds:str[bx+5]and al,11011111bmov ds:str[bx+5],aladd bx,16loop forlea dx,strmov ah,9int 21hmov ah,4chint 21hcodesg ends
end start
comment*for (int i = 0; i < ; i += 16)arr[i+5]转大写for (int i = 0;i <arr.size();i++){for (int j = 0; j < arr[0].size(); j++){cout << arr[2][5] << " ";}
}
cout << endl;*commnet
2. 把前五行a转变为大写A
assume cs:codesg,ds:data,ss:stack
data segmeNTstr db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc'db 'aaaaabbbbbccccc','$'
data endsstack segmentdb 10 dup(0)
stack endscodesg SEgmentstart:mov ax,datamov ds,axmov bx,0mov cx,4for:mov dx,cxmov si,0mov cx,5for1:mov al,ds:str[bx+si]and al,11011111bmov ds:str[bx+si],alinc siloop for1mov cx,dxadd bx,16loop forlea dx,strmov ah,9int 21hmov ah,4chint 21hcodesg ends
end start
comment*
bx
for (int i = 0;循环4次;i += 16){sifor (int j = 0;循环5次;j++){arr[j+i]转大写}
}*comment
这篇关于5. 4 二重循环将二维数组的某列、某矩形转大写的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!