题解列表
C语言程序设计教程(第三版)课后习题8.9 (C++代码)(其实不需要开数组,一个一个字符读入并判断就好了)
摘要:解题思路:其实不需要开数组,一个一个字符读入并判断就好了注意事项:结束不是'\0',也不是'\n',而是'EOF',即文件结束参考代码:#include……
钟神赛车 (C语言代码)
摘要:#include <stdio.h>#define M 1000int main(){ int n; int a[M],b[M]; int i,j,t,k; int value,win,lose,ma……
模拟计算器 (C语言代码)
摘要:参考代码:int main()
{
int a,b,c;
char s;
scanf("%d%d",&a,&b);
getchar();
s=getchar();
switc……
C语言程序设计教程(第三版)课后习题8.8 (C语言代码)
摘要:解题思路:注意事项:参考代码:# include <stdio.h>int main(){ int num; int a,b,c,d; scanf ("%d",&num); ……
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)
摘要:#include <stdio.h>struct stu{ char name[50], num[50]; int a, b, c;};void input(struct stu *p){ scanf……
买不到的数目 (C++代码)
摘要:#include<iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)cout<<a*b……
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include <stdio.h>
int main()
{
int a,b,c,d;
scanf("%d%d%d", &a,&b,&c);……
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)
摘要:解题思路:先判断输入的n如果等于0,则返回sn=1;否则进入while(i<=n)循环,执行n次。考虑到阶乘可能超过int类型所表示的数据范围,应设long long jie=1,sn=0;注意事项:……
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)
摘要:#include <stdio.h>main(){ int a,b,c,w; scanf("%d %d %d",&a,&b,&c); w=(a>b)?a:b;//这两句应该可以简化成一句吧 w=(w>……