x6988312
x6988312
关注数: 1
粉丝数: 20
发帖数: 312
关注贴吧数: 8
iiii iiii
go go
水一发 水一发
中午饭店 中午饭店
产品牌机会了 产品牌机会了
经常性格内向 经常性格内向
国家线路图片 国家线路图片
是不是 是不是
上班了 上班了
上班 上班
一个人的 一个人的
工作了 工作了
主要是不是 主要是不是
工作了
一个人的 一个人的
我们的的
工作了 工作了
一个人的。
地方了在一起 地方了在一起
一个人的 一个人的
一日一贴 一日一贴
一日一贴 一日一贴
一日一贴 一日一贴
一日一贴 一日一贴
一日一贴 一日一贴
一日一贴
再来一发
来一发
来一贴
为了凑足十帖
来一发
一日一贴
擦擦擦
哈哈
我是本人 本人就是我
新人求助 <html> <head> <title>test</title> <script language="JavaScript"> var i=0; var num=10; var names=new Array(); var scores=new Array(); for(i=0;i<num;i++){ names[i]=""; scores[i]=60; } function get(n){ var content=""; for(i=0;i<n;i++){ content+="学生姓名:<input type='text' id='Name' size=8 value='"+names[0]+"'> "; content+="学生成绩:<input type='text' id='Score' size=8 value='"+scores[0]+"'><br>"; } return content; } function add(){ names[num]=""; scores[num]="80"; num++; ad+="学生姓名:<input type='text' id='Name' size=8 value='"+names[0]+"'> "; ad+="学生成绩:<input type='text' id='Score' size=8 value='"+scores[0]+"'><br>"; content+=ad; } </script> </head> <body> <center> 学生成绩录入:<hr><br> <form id="frmMain"> 学生平均分:<input type="text" id="avg" size="4"> 学生人数:<input type="text" id="total" size="4"><hr><br> <div id="student" > <script language="JavaScript"> document.write(get(num)); </script> </div><hr> <input type="button" value="计算" onclick=""> <input type="button" value="增加" onclick="add()"> </form> </center> </body> </html> 要求点击增加按钮,可以添加一行。上面是我写的代码,但是不能实现添加一行。新人求大家的帮助。。。。帮忙看看到底错在哪里,本人万分感谢!!!
刚刚在健哥那里入手了v480a,坐等电脑到手直播 首先感觉健哥人不错,服务热心,话不多说到时直播。
现在想在键哥店里入手y400,但是。。。。 难道建哥不在?还是这个不是健哥?@翰墨流星
本人最近想从键哥那里入手联想y400 ifi t 这是想了好久的问题了,必竟是网够,必竟是5000rmb(穷屌丝5000元也一大笔钱),所以难免会有担心,担心质量问题,担心会不会被坑,看到这吧有这么多吧友都在顶健哥,健哥是不是真的值得信赖。众吧友们给点建议。如果健哥值得相信,我肯定从健哥那里搞一台。
新手问大家一个问题,知道的来回答下,万分感谢。 现在我假设有一个数组p[10]; 而我初始化时不让他的每个元素等于一个具体的数字,而让让为空,即: for(i=0;i<10;i++) p[i]=NULL; 我想问这样会不会有问题,特别是在: if(p[1]==NULL)时会不会出错?或者不能正确判断p[1]为空值? 望大神解答,在下万分感谢。。。。
大神在吗?装了LEB 开启闪退,怎么办啊?求帮助++++ 就是这个问题。...
关于二叉树的层次遍历问题,求大神帮助 #include<stdio.h> #include<stdlib.h> struct node{ char data; struct node *lchild,*rchild; }; struct stacks{ struct node stack[50]; int top; int length; }; struct stacks *creattree(){/*创建二叉树*/ int flag=1,i; char c=NULL; struct stacks *put; struct node *p=NULL; put=(struct stacks *)malloc(sizeof(struct stacks)); put->top=-1; put->length=0; printf("please input a generalizde list\n"); while(c!='\n'){ scanf("%c",&c); if(c=='('){ put->top++; put->stack[put->top]=*p; flag=1; } else if(c==')') put->top--; else if(c==',') flag=2; else if(c=='\n') break; else{ p=(struct node *)malloc(sizeof(struct node)); p->lchild=NULL; p->rchild=NULL; p->data=c; put->length++; if(put->length!=0){ if(flag==1) (put->stack[put->top]).lchild=p; else if(flag==2) (put->stack[put->top]).rchild=p; } } } return put; } void overtree(struct node *root,int length){/*按层次遍历二叉树*/ struct node list[50]; int top=0,i=0; list[top]=*root; printf("the list is:\n"); printf("%c ",root->data); while(i<length){ if(list[i].lchild!=NULL){ top++; list[top]=*(list[i].lchild); printf("%c ",list[top].data); } if(list[i].rchild!=NULL){ top++; list[top]=*(list[i].rchild); printf("%c ",list[top].data); } i++; } } void main(){ struct node *root=NULL; struct stacks *head; clrscr(); head=creattree(); *root=head->stack[0]; overtree(root,head->length); printf("\nthe numbers of list is:%d ",head->length); free(head); getch(); } 这个程序是输入一个二叉树的广义表,然后建立二叉树。再按层次遍历。 然而,我却出错了,比如说输入a(b,c(d,e))最后得到的结果应该是a b c d e但是得不到。 经过我的检查,发现:在创建树的函数中,c的左右孩子为d,e;但回到了主程序里c的左右孩子竟然都成了a。这让我百思不得其解。 因此求大神帮忙
1
下一页