题解列表
循环数组做法,有用的话点点赞
摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;#define maxn 105int a[maxn];int b[maxn];int ma……
C语言程序设计教程(第三版)课后习题12.5 (C语言代码)
摘要:#include<stdio.h>int move(value, n){ int a[32]; int i; for(i=0;i<32;i++) a[i]=value%2,value=value/2……
母牛的故事 (C语言代码)
摘要:解题思路:首先看清题目,明白当n=5时,母牛数量为6的含义,然后慢慢列数列,找规律,你会发现n>4时,第n年的母牛数量等于第n-1年母牛的数量在再上第n-3年母牛的数量(因为这些母牛都会在他们的第四年……
WU-C语言程序设计教程(第三版)课后习题8.4 (C语言代码)
摘要:#include<stdio.h>
void change(int a[][3])
{
int i,j,t;
for(i=0;i<3;i++)
{
for(j=i;j<3;j++……
C语言程序设计教程(第三版)课后习题4.9 (C语言代码)
摘要:注意事项: "c="参考代码:#include<stdio.h>int main(){ float f; scanf("%f",&f); printf("c……
C语言程序设计教程(第三版)课后习题11.11 (C语言代码)
摘要:#include<stdio.h>struct node{ int date; struct node *next;};int main(){ int n,i; scanf("%d",&n); ……
WU-C语言程序设计教程(第三版)课后习题8.6 (C语言代码)
摘要:#include<stdio.h>
#include<string.h>
void link(char *a,char *b)
{
a=strcat(a,b);
puts(a);
……
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)
摘要:解题思路:除了for循环,还是用了pow()函数注意事项:参考代码:#include <stdio.h>#include <math.h>int main(){int a = 2, i, n, s =……
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,a,b,c,d,e; //abcde is five bit integer in……