自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 输入姓名成绩并按照从小到大的顺序输出

#include "stdio.h"#include "malloc.h"#include "string.h"#define N 3struct Student{char*number; char*name; int score;}Stu[N];boble(struct Student*a){int i,j; struct Student t; for(j=1;j<N;j

2014-05-13 20:26:39 2267

转载 求逆序数

#include #include #include void main(){ int num,count=0,i=0,j,k; int tmp[10]; printf("请输入一个整数:"); scanf("%d",&num); num=abs(num); while(num) { tmp[i]=num%10; i++; num/=10; } for(i--

2014-04-08 10:47:40 407

原创 求100到200之间的素数

#include int main() { int i,j; for (i=101; i<=200; i++) { for (j=2; j<i; j++) { if (i%j>0) printf("%d ",i);

2014-04-08 10:46:28 514

原创 求一个数的约数

#include "stdio.h"void main(){int i,x; printf("shu ru yi ge zheng shu:"); scanf("%d",&x); for(i=1;i<=x;i=i++) {if(x%i==0) printf("%d\n",i);}}

2014-04-08 10:43:11 520

原创 辗转相除法

#include "stdio.h"void main(){int x,y,z;printf("input liang ge zheng shu please:");scanf("%d,%d",&x,&y);do{z=x%y; x=y; y=z; z=x%y;}while(z>0);printf("%d",x);}

2014-04-08 10:41:28 409

原创 输出乘法口诀

#includevoid main(){ int a,b; a=b=1; do {do {printf(" %d*%d=%d ",a,b,a*b); b++;} while(b<=9); printf("\n"); a++,b=1; } while(a<=9);}

2014-04-08 10:29:51 352

原创 判断两个数是否互为素数

#include "stdio.h"void main(){int x,y,z; scanf("%d,%d",&x,&y); z=x-y; if(z>0) {x=y; y=z; z=x-y; } if(z==1) printf("hu wei su shu"); else printf("no"); }

2014-04-08 10:24:26 3007 1

原创 清明节左作业

#include "stdio.h"void main(){int a; printf("input a zheng shu please:"); scanf("%d",&a); printf("%d\n%o\n%x\n",a,a,a);}

2014-04-07 22:21:43 507 1

原创 如何写出一个空心正方形新解法

#include "stdio.h"void add(bianchang){int i,j,c; c=bianchang; for(i=1;i<=c;i=i++) {for(j=1;j<=c;j=j++) {if(i==1||i==c) printf("*"); else {if(j==1||j==c) printf("*"); else prin

2014-03-25 20:26:34 1102

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除