题解列表
C语言程序设计教程(第三版)课后习题9.3 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)/2#define area(a,b,c,S) sqrt……
C语言程序设计教程(第三版)课后习题9.2 (C语言代码)
摘要:解题思路: #define 标识符 字符串; 例如#define m a*b;其中a*b的值就是m,在主函数中m就是调用a*b;带参宏定义的一般形式为: #define 宏名(形参表) 字符串; 在字……
【明明的随机数】 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
void sort(int a[],int n)
{
int i,j,temp;
for(i=0;i<n-1;i++)
……
【数组的距离】 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
#include<math.h>
void sort2(int a[],int n)
{
int i,j,temp;
f……
C语言程序设计教程(第三版)课后习题9.1 (C语言代码)
摘要:解题思路:注意事项: #define 标识符 字符串; 例如#define m a*b;其中a*b的值就是m,在主函数中m就是调用a*b;带参宏定义的一般形式为: #define 宏名(形参表) ……
【排队买票】 (C语言代码)
摘要:解题思路:进行全排列,关键点在于前面钱数为1的小朋友不能少于钱数为2的小朋友。注意事项:参考代码:#include<stdio.h>
int m,n,k,count=0;
int book[11]……
番8 C二级辅导-分段函数 (C++代码)
摘要:解题思路: c++入门训练,关键注意fixed和setprecision操作;注意事项:参考代码:#include <iostream>
#include <iomani……
C语言程序设计教程(第三版)课后习题8.8 (C语言代码)
摘要:解题思路:十分简洁的代码,注意数组是从0开始的。注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i; char a[4];……
番7C语言训练-"水仙花数"问题1 (C++代码)
摘要:解题思路: c++训练,逻辑值,取余和除法注意事项:参考代码:#include <iostream>
using namespace std;
int main()
{
……