上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
摘要: 题目:809*??=800*??+9*?? 其中??代表的两位数, 809*??为四位数,8*??的结果为两位数,9*??的结果为3位数。求??代表的两位数,及809*??后的结果。 程序分析:无。 实例: 1 #include <stdio.h> 2 3 void output(long int 阅读全文
posted @ 2020-08-11 14:15 C语言自学网 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目:海滩上有一堆桃子,五只猴子来分。第一只猴子把这堆桃子平均分为五份,多了一个,这只 猴子把多的一个扔入海中,拿走了一份。第二只猴子把剩下的桃子又平均分成五份,又多了 一个,它同样把多的一个扔入海中,拿走了一份,第三、第四、第五只猴子都是这样做的, 问海滩上原来最少有多少个桃子? 程序分析:无。 阅读全文
posted @ 2020-08-01 15:42 C语言自学网 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 题目:字符串排序。 程序分析:无。 程序源代码: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include <string.h> 4 5 void swap(char*str1,char*str2); 6 int main() 7 { 8 char st 阅读全文
posted @ 2020-08-01 15:41 C语言自学网 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 题目:找到年龄最大的人,并输出。请找出程序中有什么问题。 程序分析:无。 实例: 1 #include<stdio.h> 2 #include<stdlib.h> 3 struct man{ 4 char name[20]; 5 int age; 6 } 7 person[3]={"li",18," 阅读全文
posted @ 2020-08-01 15:39 C语言自学网 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目:填空练习(指向指针的指针)。 程序分析:无。 程序源代码: 1 #include<stdio.h> 2 #include<stdlib.h> 3 int main() 4 { 5 const char *s[]={"man","woman","girl","boy","sister"}; 6 阅读全文
posted @ 2020-08-01 15:37 C语言自学网 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 题目:编写一个函数,输入n为偶数时,调用函数求1/2+1/4+...+1/n,当输入n为奇数时,调用函数1/1+1/3+...+1/n(利用指针函数)。 程序分析:无。 实例: 1 #include<stdio.h> 2 #include<stdlib.h> 3 double evenumber(i 阅读全文
posted @ 2020-07-14 12:05 C语言自学网 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 题目:输入一个整数,并将其反转后输出。 程序分析:无。 实例 - 使用 strlen() 1 #include <stdio.h> 2 int main() 3 { 4 int n, reversedNumber = 0, remainder; 5 6 printf("输入一个整数: "); 7 s 阅读全文
posted @ 2020-07-14 12:03 C语言自学网 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目:连接两个链表。 程序分析:无。 实例: 1 #include <stdlib.h> 2 #include <stdio.h> 3 struct list 4 { 5 int data; 6 struct list *next; 7 }; 8 typedef struct list node; 阅读全文
posted @ 2020-07-14 11:50 C语言自学网 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 题目:反向输出一个链表。 程序分析:无。 实例: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<malloc.h> 4 typedef struct LNode{ 5 int data; 6 struct LNode *next; 7 }LN 阅读全文
posted @ 2020-07-14 11:48 C语言自学网 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题目:创建一个链表。 程序分析:无。 实例: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<malloc.h> 4 typedef struct LNode{ 5 int data; 6 struct LNode *next; 7 }LNod 阅读全文
posted @ 2020-07-14 11:47 C语言自学网 阅读(211) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页