编写题解 1009: [编程入门]数字的处理与判断--解题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<iostream>using namespace std;int main (){ long int a,tem…… 题解列表 2022年03月04日 0 点赞 0 评论 140 浏览 评分:0.0
1009: [编程入门]数字的处理与判断 摘要:解题思路:分成了三个函数,写得非常繁琐。逆序输出的思路是建一个大小为位数的数组,按位存进去,再逆序输出,因此需要传入的参数有两个,原数字和它的位数。感觉这么写会浪费大量的空间和时间……大家笑一笑就好。…… 题解列表 2022年02月20日 0 点赞 0 评论 320 浏览 评分:9.9
C++ 利用string创建str对象 摘要:解题思路:利用c++ string 创建str对象 类似于字符数组注意事项:第二行末尾没有空格参考代码:/**********************************************…… 题解列表 2022年02月10日 0 点赞 0 评论 389 浏览 评分:0.0
字符串处理各位数值 摘要:解题思路将输入的数看成字符然后就可以用strlen()函数来获得字符串的个数,也就相当于一个多位数的位数。接下来输出每位数:如果用字符可以避免数的变化,直接for循环输出,不需要再就行运输了。最后逆序…… 题解列表 2022年01月27日 0 点赞 0 评论 264 浏览 评分:8.0
c++处理,利用do-while循环解决 摘要:解题思路:(1)先想好怎么计算出位数?利用do-while循环指令,将输入的数分别除以十,得到余数和商,判断商是否为0;不是0则继续循环; do { b[i] = a % 10; a…… 题解列表 2021年12月28日 0 点赞 0 评论 624 浏览 评分:0.0
C++[编程入门]数字的处理与判断 摘要:解题思路:用pow函数解决各自输出问题注意事项:参考代码:#include#includeusing namespace std;int main(){ int x; cin>>x; int i=0,…… 题解列表 2021年12月11日 0 点赞 0 评论 511 浏览 评分:9.9
数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){ int a,c=0,d=0; i…… 题解列表 2021年11月21日 0 点赞 0 评论 479 浏览 评分:8.9
字符串迅速解决 思路简单清晰 摘要:```cpp #include #include #include using namespace std; int main() { string a; cin>>a;/…… 题解列表 2021年05月18日 0 点赞 0 评论 500 浏览 评分:9.9
求一个整数的位数及每一位数 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int x, sum = 10, a = 1; cin >> x; w…… 题解列表 2021年05月16日 0 点赞 0 评论 489 浏览 评分:9.9
[编程入门]数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string a; cin >> a; cout <<…… 题解列表 2021年04月12日 0 点赞 0 评论 222 浏览 评分:0.0