摘要: #include <stdio.h> #include <string.h> const int N=10; #include <stdlib.h> // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; c 阅读全文
posted @ 2019-12-26 17:35 Zazzle 阅读(155) 评论(1) 推荐(0) 编辑
摘要: #include <stdio.h> #include <string.h> const int N=3; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; char name[20]; float o 阅读全文
posted @ 2019-12-21 11:14 Zazzle 阅读(157) 评论(1) 推荐(0) 编辑
摘要: /* 假定输入的字符串中只包含字母和*号。 编写函数,实现: 除了字符串前导和尾部的*号之外,将串中其他*号全部删除。 在编写函数时,不得使用C语言提供的字符串函数。 例如,若字符串中的内容为****A*BC*DEF*G******* 删除后,字符串中的内容则应当是****ABCDEFG****** 阅读全文
posted @ 2019-12-14 17:27 Zazzle 阅读(254) 评论(4) 推荐(0) 编辑
摘要: 这次写了一些老师上课提到的.... //冒泡排序#include <stdio.h> const int N=4; void output(char x[], int n); // 函数声明 void sort(char x[],int n); int main() { char string[N] 阅读全文
posted @ 2019-11-30 18:40 Zazzle 阅读(160) 评论(2) 推荐(0) 编辑
摘要: //一元二次方程的#include<stdio.h> #include<math.h> int main () { double a,b,c,x1,x2; double delat,real,imag; while(scanf("%lf %lf %lf",&a,&b,&c)){ if(a==0) p 阅读全文
posted @ 2019-11-18 12:53 Zazzle 阅读(160) 评论(1) 推荐(0) 编辑
摘要: //P1格式化输入输出#include <stdio.h> int main() { double x,y; char c1,c2,c3; int a1,a2,a3; scanf("%d%d%d",&a1,&a2,&a3);//没加地址符号 printf("%d,%d,%d\n",a1,a2,a3); scanf("%c%c%c",&c1,&c2,&c3); printf("%c%c%c\n",c 阅读全文
posted @ 2019-11-03 16:32 Zazzle 阅读(196) 评论(3) 推荐(0) 编辑
摘要: #include<stdio.h>int main () { int n; scanf("%d",&n); int a[8]; for(int i=0;i<8;++i){ if(n%2==0) a[i]=0; if(n%2==1) a[i]=1; n/=2; } for(int i=7;i>=0;- 阅读全文
posted @ 2019-10-19 09:58 Zazzle 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 #include<stdio.h> int main () { int x; printf("输入一个整数"); scanf("%d",&x); if(x%2==1) printf("是奇数"); else printf("是偶数"); return 0; } #include<std 阅读全文
posted @ 2019-10-19 09:55 Zazzle 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main() { printf("201983270555"); return 0; } #include<stdio.h> int main () { printf(" · · "); return 0; } #include<stdio.h> int 阅读全文
posted @ 2019-10-19 09:20 Zazzle 阅读(198) 评论(1) 推荐(0) 编辑