摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>const int N = 10; // 定义结构体类型struct student,并定义其别名为STUtypedef struct student { long int id; cha 阅读全文
posted @ 2020-01-01 18:33 心跳永不止 阅读(85) 评论(1) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>const int N=5;// 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; }ST 阅读全文
posted @ 2019-12-23 13:13 心跳永不止 阅读(104) 评论(2) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> const int N=3;int main() { char a[N] = {'Y', 'E', 'S'}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0; i<N; i++ 阅读全文
posted @ 2019-12-17 16:35 心跳永不止 阅读(127) 评论(2) 推荐(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("Enter a,b,c: "); while( 阅读全文
posted @ 2019-12-02 22:51 心跳永不止 阅读(155) 评论(1) 推荐(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(sc 阅读全文
posted @ 2019-11-18 23:19 心跳永不止 阅读(134) 评论(1) 推荐(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) 阅读全文
posted @ 2019-11-05 21:49 心跳永不止 阅读(110) 评论(0) 推荐(0)
摘要: #include <stdio.h>int main() { int x; printf("输入一个整数:\n"); scanf("%d",&x); if(x%2==1) printf("是奇数"); else printf("是偶数"); return 0;} #include<stdio.h>i 阅读全文
posted @ 2019-10-20 16:31 心跳永不止 阅读(92) 评论(0) 推荐(0)