如何求得一个三位整数的个十百位(C语言) 摘要:解题思路:得到个十百位数,再逆序输出即可注意事项:尽量在编写时将变量赋以一些意义,以免混淆参考代码:#include int main() { int num,ge,shi,bai; …… 题解列表 2022年10月31日 0 点赞 0 评论 1155 浏览 评分:9.9
拆分位数(投机版) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a,b,c; scanf("%c%c%c",&a,&b,&c); printf("%…… 题解列表 2022年10月11日 0 点赞 0 评论 456 浏览 评分:0.0
用函数的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void Leftmove(int *n);//左移一位void getmin_print(int *n);//得到最小的那一位数并打印…… 题解列表 2022年09月18日 0 点赞 0 评论 493 浏览 评分:0.0
数组的解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int digits[3],n,i; scanf("%d",&n); for(i=0;i<3;…… 题解列表 2022年09月18日 0 点赞 0 评论 729 浏览 评分:0.0
通过循环来来分解每位上的数 摘要:解题思路:通过对输入的数对10取余,获取这个数的最低位,然后再使这个数除以10并赋给它本身,完成对这数低位的分解并重置这个数剩下的数。注意事项:循环条件位这个数大于零。参考代码: …… 题解列表 2022年08月05日 0 点赞 0 评论 720 浏览 评分:9.9
编写题解 1670: 拆分位数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a = 0, b = 0, c = 0; int num = 0; sca…… 题解列表 2022年07月30日 0 点赞 0 评论 647 浏览 评分:0.0
编写题解 1670: 拆分位数 拆分位数,这里拿一个数用'%'除以10取余,可以获得最后一位,接下来将拿这个数用'/'除以10取整,就可以把已经取到的最后一位剔除。然后接着循环,将所有的位都取到,直至用'/'除以10取整为0结束。第一:if判断变量是否是三位数。第二:while循环(a!=0)。 题解列表 2022年07月11日 0 点赞 1 评论 1076 浏览 评分:9.9
拆分位数__C语言 运行时间:6ms消耗内存:1156KB------------方法一```c#includeintmain(){intnum,left=0,center=0,right=0;scanf("%d",&num);left=num/100;//3.71center=num%100/10;//71, 题解列表 2022年07月08日 0 点赞 1 评论 2283 浏览 评分:9.9
拆分位数解法 摘要:```c #include int main() { int m, a, b, c; scanf_s("%d", &m); a = m % 10; b = m % 100 / 1…… 题解列表 2022年05月15日 0 点赞 0 评论 691 浏览 评分:0.0
拆分数位题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[100],i,x; scanf("%d",&x); for(i=0;i<100;i…… 题解列表 2022年01月18日 0 点赞 11 评论 1884 浏览 评分:9.9