C语言程序设计教程(第三版)课后习题5.7 (C语言代码) 解题思路:主要实现三个功能:1位数:利用一个数不停的除以10来实现,每一次循环i(位数)加一。2正序排列:要得到一个数x的第一个数字z,先要不断除以10,每次循环i(位数)加一,到数值小于等于9时停止循环,同时每次x要赋值给新的x(去掉首数字的x)x=x-z*(10的i次方),这样在操作,得到首数字。 题解列表 2019年01月22日 2 点赞 0 评论 1053 浏览 评分:0.0
横向打印二叉树 (Java代码)50+行代码搞定 摘要:解题思路:给组测试数据,过了应该就问题不大了.注意事项:参考代码:import java.util.ArrayList; import java.util.Collections; import …… 题解列表 2019年01月22日 1 点赞 0 评论 2938 浏览 评分:9.9
C语言程序设计教程(第三版)课后习题11.1 (C语言代码) 摘要:#include <stdio.h>int check(int year){ if((year%4==0)&&(year%100!=0)|(year%400==0)) return 1; …… 题解列表 2019年01月22日 0 点赞 0 评论 1348 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题10.5 (C语言代码) 摘要:#include <stdio.h> int check(int a[],int n) { for(int i=0;i<n;i++) { if(a[i]) r…… 题解列表 2019年01月22日 0 点赞 0 评论 1785 浏览 评分:0.0
C二级辅导-等差数列 (C语言代码) 摘要:解题思路:和=(首项+末项)×项数÷2 注意事项:当n=1时,该公式不适用参考代码:#include <stdio.h> #define first 2 #define walk_long …… 题解列表 2019年01月22日 1 点赞 0 评论 1008 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.8 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>float fac(unsigned int n){ if(n==1) return 1; if(n==2) return 2; ret…… 题解列表 2019年01月22日 0 点赞 0 评论 1405 浏览 评分:0.0
去掉双斜杠注释 (Java代码) 摘要:解题思路: 正则截取 //后面的 所有 替换为空 输出注意事项:本题注意输出格式。居然还要把换行去掉参考代码:import java.util.Scanner; public class M…… 题解列表 2019年01月22日 0 点赞 0 评论 2266 浏览 评分:6.0
蓝桥杯算法提高VIP-删除重复元素 (C++代码) 摘要:#include <bits/stdc++.h> using namespace std; int main() { char s[5000]; cin>>s; for(int…… 题解列表 2019年01月22日 0 点赞 0 评论 1587 浏览 评分:6.0
蓝桥杯历届试题-回文数字 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int n;fun(int m){int a,b,c,d,e,f; for(b=1;b<=9;b++) for(c=0;c<=9;c…… 题解列表 2019年01月22日 0 点赞 0 评论 1276 浏览 评分:0.0
蓝桥杯算法训练VIP-寂寞的数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int isJmNum(int n) { for(int i=1;i<=n;++i) { // i%10; // …… 题解列表 2019年01月22日 0 点赞 0 评论 1433 浏览 评分:0.0