摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; 阅读全文
posted @ 2019-12-25 16:18 起起司 阅读(108) 评论(3) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; 阅读全文
posted @ 2019-12-20 22:22 起起司 阅读(94) 评论(3) 推荐(0)
摘要: ex2_1_1 // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); / 阅读全文
posted @ 2019-12-15 19:05 起起司 阅读(95) 评论(3) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,int m,int bb[N]) { int i,j,k=0,flag; for(j=n;j<=m;j++) { flag=1 /*补足1*/; for(i=2;i 阅读全文
posted @ 2019-11-29 21:21 起起司 阅读(127) 评论(3) 推荐(0)
摘要: #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a,b,c,x1,x2; float delta,real,imag; printf("Enter a,b,c: "); while(scanf(" 阅读全文
posted @ 2019-11-16 21:18 起起司 阅读(185) 评论(3) 推荐(0)
摘要: #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",y,z); printf("y=%d,z=%d\n",y,z); printf("%8d,%2d\n", 阅读全文
posted @ 2019-11-02 11:00 起起司 阅读(117) 评论(3) 推荐(0)
摘要: #include<stdio.h> int main() { printf("201983270460"); printf("Hello,Mars!"); return 0; } # include <stdio.h> int product (int,int); int main(void) { int x,y,s; scanf("%d %d",&x,&y); s=product(x,y); p 阅读全文
posted @ 2019-10-20 12:56 起起司 阅读(131) 评论(1) 推荐(0)