矩阵对角线求和 摘要:解题思路:首先定义了一个 3×3 的二维整数数组 arr 。然后通过两个嵌套的 for 循环,从用户处获取 9 个整数并存储到数组中。接下来,又通过两个 for 循环计算两条对角线上元素的…… 题解列表 2024年12月25日 2 点赞 0 评论 1473 浏览 评分:10.0
对角线求和 摘要:解题思路:首先,通过两个嵌套的 for 循环,从用户获取一个 3×3 的整数矩阵的值,并存储在二维数组 arr 中。然后,通过另外两个 for 循环分别计算主对角线(左上角到右下角)元…… 题解列表 2024年12月08日 7 点赞 0 评论 1416 浏览 评分:10.0
矩阵对角线求和 摘要:#includeusing namespace std; int main() { int a[10][10]; for(int i=1;i<=3;i++) for(int…… 题解列表 2024年11月21日 0 点赞 0 评论 943 浏览 评分:9.9
普普通通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main (){ int n[3][3],s1 = 0,s2 = 0; for (int i =…… 题解列表 2024年11月19日 0 点赞 0 评论 880 浏览 评分:9.9
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j,sum=0,sum2=0,a[3][3]; for(i=0;i<3;i++) …… 题解列表 2024年11月19日 1 点赞 0 评论 666 浏览 评分:4.0
最简单的解法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { int arr[9]; for (int i = 0; i < 9; i++) { scanf("%d",…… 题解列表 2024年10月20日 0 点赞 0 评论 668 浏览 评分:0.0
旧物有情 # 手算法求矩阵对角线和 ```#includeusingnamespacestd;intmain(){inta[3][3];for(inti=0;ia[i][j];}}//主对角线坐标000102//副对角线坐标021120cout 题解列表 2024年10月10日 0 点赞 0 评论 530 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题7.3 摘要:解题思路和注意事项::1、要输入3×3的矩阵,我们很容易想到要先定义一个二维数组,定义格式为arr[3][3];2、定义之后就用for循环输入矩阵,要注意数组的下表是从0开始,且不能超过3;3、主对角…… 题解列表 2024年07月14日 0 点赞 0 评论 765 浏览 评分:9.9
编写题解 1024: [编程入门]矩阵对角线求和 摘要:解题思路:采用指针数组思路做题注意事项:参考代码:#includeint main(){ int arr[3][3]; int i = 0; int (*p)[3]=arr; …… 题解列表 2024年06月26日 0 点赞 0 评论 685 浏览 评分:9.9
编写题解 1024: [编程入门]矩阵对角线求和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=50; i…… 题解列表 2024年05月12日 0 点赞 0 评论 554 浏览 评分:0.0