题解列表

筛选

C语言训练-求矩阵的两对角线上的元素之和

摘要:解题思路:1. 首先,导入<stdio.h>头文件,该头文件包含了输入输出函数scanf和printf的声明。2. 在main函数中,声明了一些变量:   - i和j分别用于循环计数。   - n表示……

矩阵对角求和

解题思路:1.首先,声明变量i、j、n、sum1和sum2,它们分别用于控制循环和保存对角线和的结果。2.通过scanf函数读取用户输入的n,该值表示二维数组的行和列的数量。3.创建一个大小为n×n的二维数组arr。4.使用嵌套的for循环,

祝你好运laber

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    int a,b,c;    cin>>a>>b>>c;……

c++萌新的题解

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    //intÊÇÕûÊý 1 2 9 69 100   ……

使用vector()解题.

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>#include<vector>using namespace std;bool cmp(vector……

冒泡排序c++

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[600];int main(){     int n=0;     in……

冒泡排序c++

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct student{     string name;     doubl……