adila

导航

 

2021年6月14日

摘要: #include <stdio.h> #include <string.h> #include <stdlib.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; 阅读全文
posted @ 2021-06-14 21:49 adila 阅读(29) 评论(0) 推荐(0)
 

2021年6月10日

摘要: #include <stdio.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; char name[20]; floa 阅读全文
posted @ 2021-06-10 20:08 adila 阅读(27) 评论(0) 推荐(0)
 

2021年5月23日

摘要: #include<stdio.h> const int N=3; int main(){ int a[N]={1,2,3}; int i; printf("通过数组名和下标直接访问数组元素:\n"); for(i=0;i<N;i++) printf("%d;%d\n", &a[i],a[i]); p 阅读全文
posted @ 2021-05-23 15:46 adila 阅读(24) 评论(0) 推荐(0)
 

2021年5月18日

摘要: #include <stdio.h> long long fun(int n); int main() { int n; long long f; while(scanf("%d", &n) != EOF) { f = fun(n); printf("n = %d, f = %lld\n", n, 阅读全文
posted @ 2021-05-18 11:37 adila 阅读(38) 评论(0) 推荐(0)
 

2021年4月16日

摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int x, n; srand(time(0)); for(n=1; n<=N; n++) { x = rand() % 100; pr 阅读全文
posted @ 2021-04-16 07:16 adila 阅读(38) 评论(0) 推荐(0)
 

2021年4月2日

摘要: #include <stdio.h> int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; int y=3, z=4; printf("%d %d\n", 阅读全文
posted @ 2021-04-02 10:16 adila 阅读(44) 评论(1) 推荐(0)