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 评论 1097 浏览 评分:6.0
1094: 字符串的输入输出处理 摘要:#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; getchar…… 题解列表 2021年12月27日 0 点赞 0 评论 268 浏览 评分:0.0
【和最大子序列】-巧妙判断全负情况(C++) 摘要:解题思路: 在一个for循环中输入数组元素并判断负数出现次数参考代码:…… 题解列表 2021年12月27日 0 点赞 0 评论 601 浏览 评分:9.9
1204: 大小写转换 摘要:#include<bits/stdc++.h> using namespace std; int main(){ string s; while(getline(cin,s…… 题解列表 2021年12月27日 0 点赞 0 评论 327 浏览 评分:0.0
C++代码辗转相除法求最大公约数 摘要:解题思路:辗转相除法求2个整数的最大公约数求解最小公倍数:公式:2个整数的最小公倍数=它们的乘积/它们的最大公约数注意事项:暂时不明参考代码:#include<iostream>using names…… 题解列表 2021年12月27日 0 点赞 0 评论 546 浏览 评分:9.9
C++代码for循环实现数字逆序输出 摘要:解题思路:for循环逆序输出数字for(int i =9;i>=0;i--)注意事项:暂时不明参考代码:#include<iostream>using namespace std;int main()…… 题解列表 2021年12月27日 0 点赞 0 评论 1103 浏览 评分:8.7
C++代码确定插入数字的索引 摘要:解题思路:确定插入数字的索引然后分段输出即可如何确定插入数字的索引:遍历数组中已排序好的数字如果插入的数字大于当前遍历的数字,插入数字放置到当前遍历的数字的后一位否则遍历终止注意事项:暂时不明参考代码…… 题解列表 2021年12月27日 0 点赞 0 评论 306 浏览 评分:0.0
1434: 蓝桥杯历届试题-回文数字 摘要:从 10000 直接循环到 999999,先判断各位数字和是不是与所给数相等,不相等直接判断下一个数,如果相等用 equal 函数判断是否是回文数。#include <bits/stdc++.h> …… 题解列表 2021年12月26日 0 点赞 0 评论 328 浏览 评分:0.0
2004: 统计成绩 摘要:#include<bits/stdc++.h> using namespace std; int main(){ double sum(0); int x,fail(0);…… 题解列表 2021年12月26日 0 点赞 0 评论 312 浏览 评分:0.0
1749: 字符排序 摘要:#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; getchar…… 题解列表 2021年12月26日 0 点赞 0 评论 366 浏览 评分:0.0