自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 写一个求x、y的平方和的平方根的函数,并在main中执行。 好不容易啊!

#include "stdio.h"#include"math.h"/*求x,y的平方和的平方根*/ double getz(double x,double y){ double result; result=sqrt(x*x+y*y); return result;}int main(){ double x,y,z; printf("input x,y\n")

2014-04-22 19:58:10 779

原创 定义一个100长度的整型数组,使用rand函数生产随机数对每个元素进行赋值,顺序遍历该数组,输出所有值大于50的数。输出格式例子为:

/* Note:Your choice is C IDE */#include "stdio.h"#define N 100main(){ int a[N],i; a[N]=rand(); for(i=0;i<N;i++){ if(a[i]>50){ printf("a[%d]=%d\n",i,a[i]);} else printf("\n");}

2014-04-15 20:17:56 3470

原创 最后一个了!

/* Note:Your choice is C IDE */#include "stdio.h"void main(){ int i=0; int sum=0; do{ i=i+2; sum+=i; } while(i<100); printf("%d",sum);}

2014-04-07 16:59:56 314

原创 不同的方法

/* Note:Your choice is C IDE */#include "stdio.h"void main(){ int i=0; int sum=0; while(i<=100){ sum+=i; i=i+2;} printf("%d",sum);}

2014-04-07 16:53:17 295

原创 第一个为什么不对啊?

/* Note:Your choice is C IDE */#include "stdio.h"void main(){ int i=0; int sum=0; for(i=0;i<=100;i=i+2){ sum+=i; printf("%d",sum);}}

2014-04-07 16:41:33 340

原创 switch case break

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int i; scanf("%d",&i); if(i>=1 && i<=12) switch(i) { case 1:printf("January\n ");break; case 2:printf("February\n ");break; cas

2014-04-07 16:04:19 374

原创 小程序

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int x; scanf("%d",&x); if(x>=100) { if(x>=100 && x<=1000) printf("middle"); else printf("big"); } e

2014-04-07 15:57:06 271

原创 小程序

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int x; scanf("%d",&x); if(x>-1 && x<10) printf("ok"); else printf("not ok");

2014-04-07 15:54:47 300

原创 这个不太懂!

/* Note:Your choice is C IDE */#include "stdio.h"main(){ float x; scanf("%f",&x); printf("%8.4f\n",x); printf("%09.3f\n",x); }

2014-04-07 15:52:36 413

原创 小程序

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int x; scanf("%d",&x); printf("%o\n",x); printf("%d\n",x); printf("%x\n",x);}

2014-04-07 15:49:24 311

空空如也

空空如也

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

TA关注的人

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