C语言程序设计教程(第三版)课后习题8.3 (C语言代码)判断一个整数是否为素数的方法 摘要:这个方法是临时想的,感觉好像也说的通...还是用自己习惯的方法代码仅供参考:#include <stdio.h> //判断是否为素数 int isPrime(int n) { //…… 题解列表 2018年03月26日 2 点赞 0 评论 2182 浏览 评分:9.3
P1003 (C语言代码) 摘要:#include<stdio.h>int main(){ int M,t,u,f,d; scanf("%d %d %d %d %d",&M,&t,&u,&f,&d); int sum…… 题解列表 2018年03月26日 2 点赞 0 评论 927 浏览 评分:0.0
P1002 (C语言代码) 摘要:#include<stdio.h>typedef struct n{ char name[21]; int score; int grade; char c1; char…… 题解列表 2018年03月26日 0 点赞 0 评论 904 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题8.1 (C语言代码)求最小公倍数和最大公约数 摘要:参考代码如下:#include <stdio.h> //求最大公约数 int GCD(int a, int b) { int c = a % b; while (c !=…… 题解列表 2018年03月26日 0 点赞 0 评论 1555 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题7.5 (C语言代码)逆序输出 倒转数组的方法 摘要:好吧...作为解题为目的来说的话,我又把问题想复杂了...不过也好,复习一下倒转数组的方法#include <stdio.h> int main() { int array[10];…… 题解列表 2018年03月26日 0 点赞 0 评论 1371 浏览 评分:0.0
P1001 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<math.h>int cmp(const void *a,const void *…… 题解列表 2018年03月26日 1 点赞 0 评论 834 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题7.4 (C语言代码)输入一个数要求按原来排序的规律将它插入数组中 摘要:参考代码如下:#include <stdio.h> int main() { int array[10]; //定义一个可以存放10个元素的数组 int i; …… 题解列表 2018年03月26日 0 点赞 1 评论 1751 浏览 评分:9.9
C语言程序设计教程(第三版)课后习题7.2 (C语言代码)选择法排序 摘要:选择法排序,参考代码:#include <stdio.h> int main() { int array[10]; int i, j; int tmp; …… 题解列表 2018年03月26日 0 点赞 0 评论 961 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题7.1 (C语言代码)用简单素数筛选法求N以内的素数。 摘要:一定要把问题简单化!!参考代码如下:#include <stdio.h> int main() { int N; scanf("%d", &N); int i…… 题解列表 2018年03月26日 40 点赞 8 评论 3645 浏览 评分:7.6
C语言程序设计教程(第三版)课后习题6.11 (C语言代码)用迭代法求 平方根 摘要:其实吧。。一开始这题我连题目都没看懂啥意思。。。参考了一下其他人的答案代码如下:#include <stdio.h> #include <math.h> int main() { …… 题解列表 2018年03月26日 0 点赞 0 评论 1014 浏览 评分:0.0