摘要: #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-27 21:43 苏yy 阅读(159) 评论(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-23 11:17 苏yy 阅读(125) 评论(3) 推荐(0)
摘要: // 这个程序用于观察数组中的一组数据元素在内存中是否是连续存放的 // 以及数组元素的直接访问与间接访问 #include <stdio.h> #include <stdlib.h> const int N=3; int main() { char a[N]={'Y','E','S'}; // 定 阅读全文
posted @ 2019-12-16 16:47 苏yy 阅读(155) 评论(3) 推荐(0)
摘要: #include <math.h> #include <stdio.h> #include <stdlib.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int main() { double a, b, c; printf( 阅读全文
posted @ 2019-11-30 13:39 苏yy 阅读(110) 评论(0) 推荐(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 阅读全文
posted @ 2019-11-17 22:10 苏yy 阅读(101) 评论(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,%2 阅读全文
posted @ 2019-11-04 15:53 苏yy 阅读(121) 评论(4) 推荐(0)
摘要: /*this is first c program*/ # include<stdio.h> int main() { printf("Hello Mars!"); return 0; } #include<stdio.h> int product(int,int); int main (void) 阅读全文
posted @ 2019-10-20 14:10 苏yy 阅读(164) 评论(0) 推荐(0)