上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 45 下一页
摘要: #include <stdio.h> struct student{ int num; char name[40]; int computer, english, math; double average; }; int main(void){ int i, index, j ,n; struct 阅读全文
posted @ 2021-09-19 11:18 就是想学习 阅读(91) 评论(0) 推荐(0)
摘要: 人的出生日期由年、月、日组成,请在例9-1中的学生信息结构中增加一个成员:出生日期,用嵌套定义的方式重新定义该结构类型 #include <stdio.h> struct birth{ int year, month, day; }; struct student{ int num; char na 阅读全文
posted @ 2021-09-19 11:01 就是想学习 阅读(207) 评论(0) 推荐(0)
摘要: #include <stdio.h> struct complex_number{ int real; int imaginery; }; int main(void){ return 0; } 阅读全文
posted @ 2021-09-19 10:46 就是想学习 阅读(52) 评论(0) 推荐(0)
摘要: 习题8-6 删除字符 (20分) 本题要求实现一个删除字符串中的指定字符的简单函数。 函数接口定义: void delchar( char *str, char c ); 其中char *str是传入的字符串,c是待删除的字符。函数delchar的功能是将字符串str中出现的所有c字符删除。 题目就 阅读全文
posted @ 2021-09-15 23:54 就是想学习 阅读(454) 评论(0) 推荐(0)
摘要: #include <stdio.h> void splitfloat(float x, int *intpart, float *fracpart){ *intpart = (int) x; *fracpart = x - *intpart; } int main(void){ float numb 阅读全文
posted @ 2021-09-15 16:19 就是想学习 阅读(948) 评论(0) 推荐(0)
摘要: 输入一个字符串,把该字符串的前三个字母移到最后,输出变换后的字符串。比如输入"abcdef",输出为"defabc" #include <stdio.h> #include <string.h> #define MAXN 100 int main(void){ int i, length; char 阅读全文
posted @ 2021-09-15 11:14 就是想学习 阅读(138) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define MAXN 10 void swap(int *px, int *py); void bubble(int a[], int n); int main(void){ int n, a[MAXN]; int i; printf("Enter n(n< 阅读全文
posted @ 2021-09-14 22:54 就是想学习 阅读(61) 评论(0) 推荐(0)
摘要: 最近一直在学习C语言,大学的时候没好好学,想不到10多年之后,我又开始学起来了,话说C语言确实相当有意思,至少比Python有意思。 我就写一下C语言内置的scanf函数。我的理解这是一个格式化输入的函数,用于读取信息并将信息写入指定的地址内。 常规的用法 #include <stdio.h> in 阅读全文
posted @ 2021-09-14 15:55 就是想学习 阅读(916) 评论(0) 推荐(0)
摘要: 本题目要求编写程序,输入一行字符,统计每个单词的长度。所谓“单词”是指连续不含空格的字符串,各单词之间用空格分隔,空格数可以是多个。 #include <stdio.h> int main(void){ int num, space, is_print = 0,all_space=1; char c 阅读全文
posted @ 2021-09-11 16:45 就是想学习 阅读(2124) 评论(0) 推荐(0)
摘要: #include <stdio.h> void hollowPyramid ( int n ); int main() { int n; scanf("%d", &n); hollowPyramid ( n ); return 0; } /* 你的代码将被嵌在这里 */ /* */ void hol 阅读全文
posted @ 2021-09-09 16:16 就是想学习 阅读(766) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 45 下一页