【计算球体积】 (C语言代码) 摘要:解题思路:看题目,想代码,写代码。注意事项: 函数类型,代码。参考代码:#include<stdio.h>#define PI 3.1415int main(){ float r,v; scanf("…… 题解列表 2017年10月30日 0 点赞 1 评论 2131 浏览 评分:6.0
判定字符位置 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string s; int i; cin>>s…… 题解列表 2017年11月06日 1 点赞 0 评论 1094 浏览 评分:6.0
小九九 (C++代码)简单粗暴,直接输出 摘要:解题思路:注意事项:直接输出,他都给答案了,直接输出参考代码:#include<iostream>using namespace std;int main(){ printf("1*1=1\n1*2=…… 题解列表 2017年11月10日 2 点赞 3 评论 947 浏览 评分:6.0
2004年秋浙江省计算机等级考试二级C 编程题(2) (C语言描述——递归算法) 摘要:解题思路:1.求阶层利用递归算法;2.求平方和可以代用“math.h”库函数,然后利用递归求解;3.要保证每一项的符号不同,利用pow(-1,n-1);注意事项:在main主函数中的for循环要理解是…… 题解列表 2017年11月16日 2 点赞 0 评论 2021 浏览 评分:6.0
核桃的数量 (C语言代码) 摘要:#include <stdio.h>int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); for(int x=a;;x++) { if((x%a==0…… 题解列表 2017年11月16日 2 点赞 0 评论 1477 浏览 评分:6.0
龟兔赛跑预测 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int v1,v2,t,s,l; while(ci…… 题解列表 2018年03月25日 5 点赞 2 评论 1418 浏览 评分:6.0
用筛法求之N内的素数。 (C语言代码) 详解……………… 摘要:题解原理:从1开始的、某一范围内的正整数从小到大顺序排列, 1不是素数,首先把它筛掉。剩下的数中选择最小的数是素数,然后去掉它的倍数。依次类推,直到筛子为空时结束。 注意事项:①利用数组的下标作为1-…… 题解列表 2017年11月18日 0 点赞 0 评论 1777 浏览 评分:6.0
2005年春浙江省计算机等级考试二级C 编程题(1) (C语言描述if-else if语句) 摘要:解题思路:1.定义x为整型,函数f定义为double类型;2.要导入数学函数库"math.h";3.if……else if语句做判断。注意事项:输出时控制两位小数输出("%.2lf")参考代码:#in…… 题解列表 2017年11月20日 1 点赞 0 评论 1600 浏览 评分:6.0
C二级辅导-求偶数和 (C语言指针动态内存法) 摘要:解题思路:学习指针用法注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int main(){ int *a,*p,n,s=0; scanf("…… 题解列表 2017年11月20日 1 点赞 0 评论 992 浏览 评分:6.0
C语言程序设计教程(第三版)课后习题1.6 (C语言代码) 摘要:解题思路:利用if语句实现注意事项:考虑到多组数据输入参考代码:#include <stdio.h> int main() { int a,b,c; while(scanf("…… 题解列表 2018年03月27日 4 点赞 0 评论 1437 浏览 评分:6.0