07 2020 档案

摘要:man environ extern char **environ; 阅读全文
posted @ 2020-07-18 22:24 profesor 阅读(221) 评论(0) 推荐(0) 编辑
摘要:// 1234 = 1^4 + 2^4 + 3^4 + 4^4; // 341 = 3^3 + 4^3 + 1^3 // 类似于水仙花数 #include <stdio.h> #include <math.h> int digitCount(int n) { //此函数用于获取整数的位数 int i 阅读全文
posted @ 2020-07-10 10:54 profesor 阅读(127) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> typedef union { double math; double phys; double chem; } Score; typedef struct student { char name[10]; int age; Score grade; char 阅读全文
posted @ 2020-07-09 22:46 profesor 阅读(527) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> typedef enum {FALSE, TRUE} Boolean; Boolean isEven(int i) { if ( i % 2 == 0 ) return TRUE; else return FALSE; } int main() { int i 阅读全文
posted @ 2020-07-09 20:46 profesor 阅读(114) 评论(0) 推荐(0) 编辑
摘要://使用recursion来计算生成fibonacci series前49个数,并计算程序运行时间 #include <stdio.h> #include <time.h> double fibon(int n) { if (n == 1 || n == 2) return 1; else if ( 阅读全文
posted @ 2020-07-02 23:05 profesor 阅读(126) 评论(0) 推荐(0) 编辑
摘要:C //计算每个学生成绩,并求和,计算平均数 #include <stdio.h> void main() { int scores[][4] = { //不足4个元素,用0补充 {100, 99, 98, 99,}, {78, 86, 77,}, {43, 56}, {} }; int sum = 阅读全文
posted @ 2020-07-02 10:59 profesor 阅读(187) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> int main() { char *names[] = {"ant", "tiger", "dog", "orange", "apple", "banana"}, **p = names; int i; for (i = 0; i < 6; ++i, p++) 阅读全文
posted @ 2020-07-02 10:09 profesor 阅读(176) 评论(0) 推荐(0) 编辑
摘要:Longman Hardly a week goes by without some food scare being reported in the media.Hardly a month goes by without another factory closing down. Collins 阅读全文
posted @ 2020-07-01 22:48 profesor 阅读(330) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示