【编程入门】数字的处理和判断
摘要:解题思路:注意事项:参考代码:#include <stdio.h>
#include <string.h>
int main()
{
char a[10];
int i,we……
题目 1009: [编程入门]数字的处理与判断
摘要:解题思路:1. 通过循环去掉最后一位,同时让计数加 2.通过循环将数字的每一位放入数组,再遍历输出。注意事项:参考代码:#include<stdio.h>//建立数组int w[10];int ……
求最大公约数和最小公倍数
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m, n,min=1,max=1,i; cin >……
输出数字位数,并按位输出,再逆序输出。
摘要:解题思路:注意事项:参考代码:void main(){ int a; int i=0,divisor = 10; int array[5]; int trunNum = 0; ……
1009: [编程入门]数字的处理与判断
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int num = 0; cin >> num; s……
此题运用了stl中的vector容器
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ vector<int>v1; int num; cin>>n……