摘要: include <stdio.h> main() { int i,j,n=0,a[17][17]={0}; while(n<1 || n>16) { printf("请输入杨辉三角形的行数:"); scanf("%d",&n); } for(i=0;i<n;i++) a[i][0]=1; /*第一列 阅读全文
posted @ 2019-05-21 09:42 杨小伟啊 阅读(250) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main(void) { int a,b,c; char flag; scanf("%d %c %d",&a,&flag,&b); switch(flag) { case '+':c = a + b;break; case '-':c = a - b; b 阅读全文
posted @ 2019-05-21 09:05 杨小伟啊 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-05-16 09:57 杨小伟啊 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include<malloc.h>#define MaxSize 100typedef char ElemType;using namespace std;typedef struct linknode{ ElemType data; struct linknode*next; }LiStack; 阅读全文
posted @ 2019-05-14 09:54 杨小伟啊 阅读(269) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<stdlib.h>#include<string>typedef int datatype;typedef struct Node { DataType data; Node*next; }LinkList; void print(Linklist 阅读全文
posted @ 2019-05-07 09:56 杨小伟啊 阅读(82) 评论(3) 推荐(0) 编辑