vb求助:数组翻转答:Sub tt()Dim mArr, tstr$, mArrB mArr = Array(2, 5, 4, 6)tstr = Join(mArr, ",")tstr = StrReverse(tstr) & "," & tstr Debug.Print tstr mArrB = (Split(tstr, ","))End Sub
从键盘输入一个3行4列的矩阵,将其转置后,变成4行3列的矩阵输出。这个c...答:include <stdio.h> int main(void){ int a[3][4] = {11,12,13,14,21,22,23,24,31,32,33,34};int b[4][3];int i, j;for(i=0; i<4; i++) //转置数组;for(j=0; j<3; j++)b[i][j] = a[j][i];for(i=3; i>=0; i--) //反向输出转置后的数组;{ for(...
java 以数组〔5,58,62,31,2,9,64〕的中间数为轴将数组翻转答://思路很简单,首尾交换即可!public class ArrayTest {public static void main(String[] args) {int arr[] = {5,58,62,31,2,9,64};for(int a:arr)System.out.print(a+",");for (int i = 0,j=arr.length-1; i < j; i++,j--) {arr[i]=arr[i]^arr[j];arr[j]=arr[i...