题解列表

筛选

C语言程序设计教程(第三版)课后习题5.7 (C++代码)

摘要:解题思路:在不知道代码具体位数的前提下,用while循环确定位数,并通过%分离出每一位,并用数组保存,后通过for循环保证格式,根据前面求出的位数为循环次数,正序,逆序输出结果。注意事项:本题所用分离……

拆分位数 (C++代码)

摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int main(){ int n; cin>>n; for(int……

对称矩阵 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; const int M=105; int a[M][M]={0}; int mai……

姓名排序 (C++代码)

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