题解 1670: 拆分位数

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

1670: 拆分位数

摘要:解题思路:使用数组注意事项:参考代码:int i,b,a[3]={0};    scanf("%d",&b);    for(i=0;i<3;i++){    a[i]=b%10;    b/=10;……

编写题解 1670: 拆分位数

摘要:解题思路:   先定义一个整数n,并输入他的值,然后再分别拆分出百位、十位和个位(例:365/100=3……65 即百位为3;65/10=6……5 即十位为6;5/1=5 即个位为5),最后按照题目要……

简单的方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int i,g,s,b;    scanf("%d",&i);    b=i/100%10;    s=i……

简单拆分(C语言)

摘要:解题思路:逆序不是从小到大注意事项:参考代码:#include<stdio.h>int main(){ int x,a,b,c; scanf("%d",&x); a=x/100; b=x/10%10;……

1670: 拆分位数

摘要:解题思路:num1=num/100;//百位num2=num/10%10;//十位num3=num%10;//个位注意事项:希望有大佬提供不一样的思路参考代码://逆序输出这个三位数,输出个位、十位、……

1670: 拆分位数

摘要:#include<stdio.h> int main() {          //scanf("%d",&n);     char a,b,c;     a=getchar();   ……

编写题解 1670: 拆分位数

摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> //定义头文件 int main() {      int i,j,k,l;    ……

 编写题解 1670: 拆分位数(C语言)

摘要:解题思路:int类型除某个数只取整数部分注意事项:%表示取余数参考代码://逆序输出这个三位数,输出个位、十位、百位,三个数字,用空格分开 #include <stdio.h> int main ……

5行代码解决拆分位数问题

摘要:解题思路:printf函数在处理参数的时候是从右向左处理的,所以输入的内容最先被最后一个参数接收参考代码:#include<stdio.h>int main(){    printf("%c %c %……