分离整数的各个数位 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int x,a; cin >> x; while(…… 题解列表 2023年07月03日 0 点赞 0 评论 757 浏览 评分:9.9
分离整数的各个数位 转字符串 摘要:解题思路:利用charAt输出各位数。将整形转为字符串型;利用for循环遍历出共几位数注意事项:参考代码:import java.util.Scanner;public class Main { …… 题解列表 2023年04月22日 0 点赞 0 评论 586 浏览 评分:9.9
分离整数的各个数位 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int k; cin >> k; int n = k;//保留k的数值…… 题解列表 2023年04月05日 0 点赞 0 评论 756 浏览 评分:9.9
题目 2818: 分离整数的各个数位 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int x,y; x=n; …… 题解列表 2022年11月26日 0 点赞 0 评论 755 浏览 评分:9.9
暴力解法,最大限度减低难度 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,ge; scanf("%d",&n);//遍历把每一位个位数字拿出来 for(in…… 题解列表 2023年03月06日 0 点赞 0 评论 619 浏览 评分:9.9
2818: 分离整数的各个数位 ```cpp#include#includeusingnamespacestd;intmain(){chara[10];gets(a);for(inti=strlen(a)-1;i>=0;i--)cout 题解列表 2023年01月12日 0 点赞 0 评论 547 浏览 评分:9.9
用数组的方法——简单且粗暴 摘要:解题思路:换个思路,输入的是一串字符。注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[10]; int i;…… 题解列表 2022年12月31日 0 点赞 2 评论 628 浏览 评分:9.9
2818:老套路-(除十模十)-C语言 摘要:解题思路:注意事项:参考代码:#include <stdio.h> void func(long long n); int main() { long long a; scanf("%…… 题解列表 2022年12月20日 0 点赞 1 评论 827 浏览 评分:9.9
2818: 分离整数的各个数位 摘要:解题思路:注意事项:参考代码:a = input() for i in a[::-1]: print(i,end=' ')代码2:a = input() a = a[::…… 题解列表 2023年02月22日 0 点赞 0 评论 766 浏览 评分:9.0
优质题解 2818: 分离整数的各个数位(详细题解) 摘要:题目描述: 给定一个整数,要求从个位开始分离出它的每一位数字,并按照从低位到高位的顺序依次输出每一位数字。解题思路:1. 首先读取输入的整数 n。2. 使用循环,当 n 不为 0 时执行以下步骤。3…… 题解列表 2023年07月13日 4 点赞 2 评论 2284 浏览 评分:7.9