摘要: <!DOCTYPE html><html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content=" 阅读全文
posted @ 2016-07-02 21:37 胡卫雄 阅读(198) 评论(0) 推荐(0) 编辑
摘要: <div class="container"> <div class="input-group"> <input type="text" class="form-control input-lg"><span class="input-group-addon btn btn-primary">搜索< 阅读全文
posted @ 2016-07-02 19:29 胡卫雄 阅读(24502) 评论(0) 推荐(1) 编辑
摘要: #include <stdio.h>#include <stdlib.h>#include<math.h>int main(){ int a,b,c,d; double p,q,x1,x2; printf("please input a,b,c:\n"); scanf("%d%d%d",&a,&b, 阅读全文
posted @ 2016-06-30 09:29 胡卫雄 阅读(972) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<math.h>#define true 1int MaxGYS(int m,int n)//求最大公约数{ int r; while(true) { r=m%n; if(r==0) { return n; } else { m=n; n=r; } 阅读全文
posted @ 2016-06-25 12:45 胡卫雄 阅读(266) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<math.h>int isSuShu(int n)//判断一个数是不是素数{ int i; for(i=2;i<=(int)sqrt(n);i++) { if(n%i==0) { return 0; } } return 1;}int main() 阅读全文
posted @ 2016-06-24 22:16 胡卫雄 阅读(5174) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #define M(x) x;x;x;x;x;x;x;x;x;x; int main() {       int i;       M(M(printf("%d",i++)));       return 0; } 阅读全文
posted @ 2016-03-14 16:51 胡卫雄 阅读(175) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int m; void hanoi(int n,char x,char y,char z); printf("input the number of disk:\n"); scanf("%d",&m); hanoi(m,'A','B','C' 阅读全文
posted @ 2016-03-09 16:53 胡卫雄 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 用冒泡排序,将输入的十个数按从小到大排列 #include<stdio.h>int main(){ int i,j,t; int a[10]; printf("请输入10个整数:\n"); for(i=0;i<10;i++) scanf("%d",&a[i]); for(j=0;j<9;j++) f 阅读全文
posted @ 2016-03-06 00:25 胡卫雄 阅读(205) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int a[20]={1,1}; int n=2,i; for(n=2;n<20;n++) { a[n]=a[n-1]+a[n-2]; } for(i=0;i<20;i++) { if(i%5==0) printf("\n"); printf 阅读全文
posted @ 2016-03-05 23:46 胡卫雄 阅读(692) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<math.h> int main(){ int i,n,r,ret; printf("请输入一个大于1的数:\n"); scanf("%d",&n); r=sqrt(n); for(i=2;i<=r;i++) { if(n%i==0) { ret= 阅读全文
posted @ 2016-03-05 18:02 胡卫雄 阅读(610) 评论(0) 推荐(0) 编辑