C++代码 for循环 求余 整除 数组保存每位数值 逆序输出 摘要:解题思路:for循环 求余 整除 数组保存每位数值 逆序输出注意事项:暂时不明参考代码:#include<iostream>using namespace std;int main(){ int…… 题解列表 2021年12月28日 0 点赞 0 评论 1048 浏览 评分:0.0
C++string库,for循环,if判断元音,char数组 摘要:解题思路:string库,for循环,if判断元音,char数组注意事项:暂时不明参考代码:#include<iostream>#include<string>using namespace std;…… 题解列表 2021年12月28日 0 点赞 0 评论 1210 浏览 评分:0.0
C++代码String库函数,for循环,索引 摘要:解题思路:for循环,索引注意事项:暂时不明参考代码:#include<iostream>#include<string>using namespace std;int main(){ stri…… 题解列表 2021年12月27日 0 点赞 0 评论 501 浏览 评分:0.0
C++代码,使用string库 摘要:解题思路:逆序输出字符串for (int i=str.length()-1;i>=0;i--) cout<<str[i];注意事项:暂时不明参考代码:#include<iostream>#includ…… 题解列表 2021年12月27日 0 点赞 0 评论 379 浏览 评分:0.0
C++代码采用一维数组。主对角线好确定,法1其余手写。法2循环赋值转置。 摘要:解题思路:主对角线好确定法1其余手写,略法2循环赋值转置。if(j==i) continue; arr2[3*i+j]=arr1[3*j+i];//i+1是行,j+1是列。互换即可…… 题解列表 2021年12月27日 0 点赞 0 评论 379 浏览 评分:0.0
C++素数判断,for循环,除法求余数判断素数,非素数的话采用exit(0);提前终止程序。默认2为素数 摘要:解题思路:for循环,除法求余数判断素数,非素数的话采用exit(0);提前终止程序。默认2为素数。注意事项:暂时不明参考代码:#include<iostream>using namespace st…… 题解列表 2021年12月27日 0 点赞 0 评论 553 浏览 评分:0.0
C++代码字符串实现求共轭复数根i,尝试#include<complex>求解未果,如果有友友这种方法做出来请直接评论留言,谢谢~ 摘要:解题思路: 一元二次方程标准形式ax²+bx+c=0(a≠0)求根公式* x=[-b±√(b²-4ac)]/2a判别式delta=b²-4ac如果delta<0,那么方程有2个共轭复数根求根公式依然适…… 题解列表 2021年12月27日 0 点赞 0 评论 1184 浏览 评分:6.0
1094: 字符串的输入输出处理 摘要:#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; getchar…… 题解列表 2021年12月27日 0 点赞 0 评论 380 浏览 评分:0.0
【和最大子序列】-巧妙判断全负情况(C++) 摘要:解题思路: 在一个for循环中输入数组元素并判断负数出现次数参考代码:…… 题解列表 2021年12月27日 0 点赞 0 评论 681 浏览 评分:9.9
1204: 大小写转换 摘要:#include<bits/stdc++.h> using namespace std; int main(){ string s; while(getline(cin,s…… 题解列表 2021年12月27日 0 点赞 0 评论 431 浏览 评分:0.0