自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

翻译 第一次接触C语言

错误:1、变量间没有加逗号,             2、句尾没有加分号,            3、分段符没有加在引号里面。

2014-06-17 20:20:08 388

原创 week1604

本周课的重点:1、深刻理解结构体和指针:

2014-06-10 20:41:31 353

原创 week1603

赋值的部分/* Note:Your choice is C IDE */#include "stdio.h"struct stu_t { char name[20]; int age; };main(){ struct stu_t cg; cg.name[20]="hello world"; cg.age=28; }

2014-06-10 20:17:57 349

原创 week1602

/* Note:Your choice is C IDE */#include "stdio.h"struct stu_t { char *name; int age; };main(){ struct stu_t cg; cg.name="hello world"; cg.age=28; }

2014-06-10 20:14:30 341

原创 week16

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int ages[3]={18,19,20}; int *p; p=ages; printf("%d %d %d %d \n",ages[1],p[1],*(p+1),*(ages+1)); }数组与指针

2014-06-10 20:10:34 336

原创 端午节 生活启示录

/* Note:Your choice is C IDE */#include "stdio.h"main(){ char view[80]; printf("What have you done recently?\n"); gets(view); printf("How do you think of the characters of it?\n"); gets(view);

2014-06-03 20:13:07 462

原创 释放内存时要注意啦

/* Note:Your choice is C IDE */#include "stdio.h"#include "stdlib.h"main(){ int *p,*q; p=(int *)malloc(sizeof(int)*3); q=p; *p=4; p++; *p=5; p++; *p=6; printf("%d %d %d\n",q[0],q[1],q[2])

2014-06-03 19:53:46 405

原创 week15

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int i; int *p=&i; i=3; printf("i=%d\n",i); *p=4; printf("i=%d\n",i); }

2014-06-03 19:29:30 405

原创 week14 清空行

/* Note:Your choice is C IDE */#include "stdio.h"struct gift { char person[20]; char what [20]; int value;}; main(){ struct gift arrays[5]; int i; for(i=0;i<5;i++) { print

2014-05-27 20:35:15 317

原创 week14闲来无事

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int a; int *pi; int i; pi=&a; scanf("%d",&a); for(i=0;i<100;i++) { pi+=i; printf(" %d ",*pi); if(i%10==9)

2014-05-27 20:18:53 335

原创 week 14 lianxi

/* Note:Your choice is C IDE */#include "stdio.h"struct qimo { char name[20]; int scores; }; main(){ struct qimo you = { "haopengyou", 99}; printf("%s scores is %d\n",you.name,you.

2014-05-27 19:59:53 312

转载 week 14

http://192.168.158.64:8080/c/index.html呵呵 好久不写网页程序了。。。看这里 看这里 今天晚上的练习今天练习的主题是:结构体先写个简单的结构体吧,{姓名,成绩}两个数据成员1 写个结构体的变量,学学如何使用2 写个结构体的数组,强化数组和结构体的理解3 如果能写出个结构体的指针并学会使用,请喝酸奶^_^

2014-05-27 19:03:22 578

原创 week 13 练习一的修改版

/* Note:Your choice is C IDE *///每次的输入都有更新#include "stdio.h"#define N 45/*函数声明*/int inputSS(char names[][20],int score[],int num);void printSS(char names[][20],int score[],int num);void

2014-05-20 21:00:38 346

原创 week 13 练习一

/* Note:Your choice is C IDE */#include "stdio.h"#define N 45/*函数声明*/int inputSS(char names[][20],int score[],int num);void printSS(char names[][20],int score[],int num);void getMAX(char n

2014-05-20 20:31:34 346

原创 520 的程序

/* Note:Your choice is C IDE */#include "stdio.h"main(){ printf(" ** **\n" " *** ***\n" "**** ****\n" " *** ***\n" " ** **\n"

2014-05-20 19:02:02 1066

转载 week 10 课上实例

C程序设计Week10课上实例分类: C课程 2014-05-06 16:28 88人阅读 评论(0) 收藏 举报目录(?)[+]1 一个神奇的程序== 使用了 【指针】【强制类型转换】两项技术 或规则 == == 里面的地址可能需要重新写一下下 ==[cpp] view plaincopy#include "stdio.h"  main(){      int a = 3; 

2014-05-20 18:25:06 351

原创 week 12 输入姓名与成绩,输出,最高

/* Note:Your choice is C IDE */#include "stdio.h"void gettwo(int a);void main (){ gettwo(46);}void gettwo(int a){ int i; int u=0; int max; int value[100]; char names[100][20];

2014-05-13 19:53:03 423

转载 week 12

C程序设计Week12晚上练习分类: C课程 2014-05-13 15:27 28人阅读 评论(0) 收藏 举报本周只进行一个程序,以前的一个程序。自定义如下函数,输入n(n<46)个学生的姓名和成绩,顺序输出这n个学生的姓名和成绩,并输出最高成绩的姓名和成绩。预习struct结构体,思考如何改进这一程序。[cpp] view plaincopy//为coun

2014-05-13 18:54:40 322

原创 week 11 67

#include void copy_arr(double source[5][5],double target1[5][5],int j){ int i,u; for(u=0;u<5;u++) {for(i=0;i<j;i++) { target1[u][i]=source[u][i]; printf(" the target1[%d][%d] is %lf\n",

2014-05-10 18:46:14 330

转载 week 10 的遗留问题

C程序设计Week10课上实例分类: C课程 2014-05-06 16:2865人阅读 评论(0)收藏举报目录(?)[+]一个神奇的程序变量review一个错误的程序 数组的另类理解指针与数组理解函数中的传值传地址当函数的参数为指针为数组时指向函数的指针利用指针动态分配内存1 一个神奇的程序== 使用了 【指针】

2014-05-08 17:31:37 372

原创 cha

///* Note:Your choice is C IDE */#include "stdio.h"double cha(double a[10]){ double max; double min; int i; max=a[0]; min=a[0]; for(i=1;i<10;i++) if(max<a[i]) max=a[i]; for

2014-05-06 20:48:42 389

原创 最大值的索引

/* Note:Your choice is C IDE */#include "stdio.h"main(){ double a[10]; int i; int u=0; double max; for(i=0;i<10;i++) scanf("%lf",&a[i]); max=a[0]; for(i=1;i<10;i++) {if(max<a[i

2014-05-06 20:23:00 923

原创 最大值

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int a[10]; int i; int max; for(i=0;i<10;i++) scanf("%d",&a[i]); max=a[0]; for(i=1;i<10;i++) { if(max<a[i]) max=a[i];}

2014-05-06 20:10:50 320

原创 11 有待测试

/* Note:Your choice is C IDE */#include "stdio.h"#include "string.h"main(){ int i; double target1[5]; double target2[5]; double source[5]={1.1,2.2,3.3,4.4,5.5}; for(i=0;i<5;i++) {

2014-05-06 20:02:12 344

转载 week 11

云计算大会门票限量申请 【社区之星】孔德芳:如何才能提高Java Web性能? C程序设计Week11作业 分类: C课程 2014-05-06 18:22 42人阅读 评论(0) 收藏 举报 目录(?)[+]取址符的理解函数的参数传递数组与指针自己动手编程1 取址符&的理解《c primer》第234页,loccheck程序。抄代码,理解

2014-05-06 19:25:52 386

原创 week 11 lianxi

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int a=3; *((int *)0xffcc)=8; printf("a=%d",a); //printf("a=%d,address of a is %p\n",a,&a);有无它的区别 }/* Note:Your choice i

2014-05-06 19:22:31 316

原创 week 10 字符串

/* Note:Your choice is C IDE */#include "stdio.h"#include"string.h"int zimu(char line[100]);int kongge(char line[100]);int shuzi(char line[100]);void main(){ char line[100]; puts("pl

2014-04-29 21:55:50 310

原创 week 10

/*/* Note:Your choice is C IDE */#include "stdio.h"void daoxu(int n);int a[10];int i;main(){ for(i=0;i<10;i++) scanf("%d",&a[i]); daoxu(10); }void daoxu(int n){ if(

2014-04-29 20:12:21 346

原创 week 10 lianxi

/* Note:Your choice is C IDE */#include "stdio.h"#define a 35long fibonacci(int n);main(){ printf("%d de value is %ld",a,fibonacci(a)); }long fibonacci(int n){ if (n>2) retu

2014-04-29 18:59:51 298

转载 week 10

云计算大会抢票倒计时     高校俱乐部“我是Coding之星”      【公告】博客数据异常已全部恢复 C程序设计week10作业分类: C课程 2014-04-29 18:1611人阅读 评论(0)收藏举报本周作业,大家加油 【1】使用递归函数,计算斐波那契数列,输出第35个数。【2】使用递归

2014-04-29 18:19:41 423

原创 返回值的第二个作用

/* Note:Your choice is C IDE */#include "stdio.h"int power(int a){ printf("the first\n"); return a*a; printf("the second\n");}main(){ printf("%d\n",power(5)); }

2014-04-22 19:20:49 375

原创 练习一

/* Note:Your choice is C IDE *//*平方和*/#include "stdio.h"#include"math.h"float goodjob(int a,int b );main(){ int a,b; scanf("%d %d",&a,&b); goodjob(a,b); }float goodjob(in

2014-04-22 18:45:10 364

转载 week 9

C程序设计Week9 练习题目 分类: C课程 2014-04-22 18:11 12人阅读 评论(0) 收藏 举报 开了一下午会,不好意思,发东西太晚了。。。练习一 函数热身1 写一个无参数无返回值的函数sayHello,并在main中执行2 写一个求x、y的平方和的平方根的函数,并在main中执行练习二 变量的命名空间1 写一程

2014-04-22 18:23:25 406

原创 0805

/* Note:Your choice is C IDE */#include "stdio.h"#include "string.h"#define answer "-1"main(){ char c[5][20]; int i=0; int j=0; gets(c[i]); while(strcmp(c[i],answer)!=0 &

2014-04-15 20:34:52 439

转载 0805

[cpp] view plaincopyprint?/* Note:Your choice is C IDE */ #include "stdio.h" #include "stdlib.h" #define N 25 main() { int i,j,temp; int students[N]; for(i=0;i<

2014-04-15 19:57:42 320

原创 0804

/* Note:Your choice is C IDE */#include "stdio.h"main(){ int a[2][2]; int b[2][2]; int c[2][2]; int i,j; for(i=0;i<2;i++) {for(j=0;j<2;j++) a[i][j]=(int)(rand());} for(i=0;i

2014-04-15 19:52:52 371

原创 0803

/* Note:Your choice is C IDE */#include "stdio.h"#include "stdlib.h"main(){ int a[8][8]; int i=0; int j=0; for(i=0;i<8;i++) { for(j=i;j<8;j++) a[i][j]=(int)(rand())

2014-04-15 19:45:21 286

原创 080101

/* Note:Your choice is C IDE */#include "stdio.h"#include "stdlib.h"main(){ int i[100]; int a[100]; int j; int r=0; for(j=0;j<100;j++) {i[j]=(int)(rand()); if(i[j]>5

2014-04-15 19:18:42 294

原创 0801

/* Note:Your choice is C IDE */#include "stdio.h"#include "stdlib.h"main(){ float i; i=rand(); printf("%f",i); }/* Note:Your choice is C IDE */#include "stdio.h"#include "st

2014-04-15 19:10:56 331

转载 week 8

C程序设计Week8 练习题目 分类: C课程 2014-04-15 18:07 11人阅读 评论(0) 收藏 举报 目录(?)[+]随机函数练习 参照王芳版课本第45页的例子练习练习随机函数rand的用法请使用rand函数来写一个上午上课随机点名的小程序要求执行该程序后会输出被提问学生的学号注意咱班有45个人学号为145对2中程序进行改进要求一次输出7个学生的

2014-04-15 18:13:32 367

空空如也

空空如也

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

TA关注的人

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