上一页 1 ··· 283 284 285 286 287 288 289 290 291 ··· 408 下一页
摘要: 1、 #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <stdbool.h> int main(void) { int ch; char filename[128]; FILE * fp; bool word = 阅读全文
posted @ 2021-08-29 16:49 小鲨鱼2018 阅读(266) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #include <ctype.h> #include <stdbool.h> int main(void) { char ch; bool word = false; bool space = false; int words = 0; while((c 阅读全文
posted @ 2021-08-29 16:23 小鲨鱼2018 阅读(708) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #include <stdlib.h> int main(void) { int ch; FILE * fp; char filename[128]; int sum = 0; printf("please input filename: "); scan 阅读全文
posted @ 2021-08-28 23:43 小鲨鱼2018 阅读(112) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> int main(void) { char choice; printf("a) xxxx b) yyyy\n"); printf("c) zzzz q) quit.\n"); printf("input your choice: "); while((c 阅读全文
posted @ 2021-08-27 02:12 小鲨鱼2018 阅读(171) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #include <stdbool.h> long get_long(void); long square_sum(long num1, long num2); bool get_range(long start, long end, long lower 阅读全文
posted @ 2021-08-27 01:02 小鲨鱼2018 阅读(327) 评论(0) 推荐(0)
摘要: #include <stdio.h> long get_long(void); int main(void) { long num; printf("please input an num: "); num = get_long(); printf("num: %ld.\n", num); retu 阅读全文
posted @ 2021-08-26 01:26 小鲨鱼2018 阅读(683) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main(void) { long num; printf("please input an positive num: "); while(1) { while(scanf("%ld", &num) != 1) { printf("please inp 阅读全文
posted @ 2021-08-26 01:06 小鲨鱼2018 阅读(400) 评论(0) 推荐(0)
摘要: 测试程序1: #include <stdio.h> int main(void) { char ch; printf("please input an character: \n"); while((ch = getchar()) != '#') printf("xxx\n"); return 0; 阅读全文
posted @ 2021-08-25 23:07 小鲨鱼2018 阅读(435) 评论(0) 推荐(0)
摘要: c语言中使用程序读取文件。 #include <stdio.h> #include <stdlib.h> int main() { int ch; FILE * fp; char fname[50]; printf("enter the name of the file: "); scanf("%s 阅读全文
posted @ 2021-08-25 01:31 小鲨鱼2018 阅读(628) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #include <ctype.h> int main(void) { char ch; int n_space = 0, n_lines = 0, n_other = 0; while((ch = getchar()) != '#') { if(ch = 阅读全文
posted @ 2021-08-23 00:25 小鲨鱼2018 阅读(127) 评论(0) 推荐(0)
上一页 1 ··· 283 284 285 286 287 288 289 290 291 ··· 408 下一页