/*时间:2011年9月8日16:21:28目的:学习构造构造数组的方法,了解动态数组使用上与静态数组一样简单,并体会动态数组的优点备注:优点包括 1.动态数组的长度可由程序员输入,不必事先指定 2.动态数组的内存可由程序员手动分配和释放 3.动态数组的长度可由程序员手动增长或缩短 4.动态数组方便进行跨函数使用(这个以后在学)*/# include <stdio.h># include <malloc.h> int main (void){ int a[5]; //这是构造静态一维数组,如果int型占4个字节,所以系统自动分配了固...
session.setAttribute("name","郑州标牌厂家");
session.setAttribute("keywords","郑州路牌厂家");
session.setAttribute("keywords2","郑州停车场设施");
session.setAttribute("keywords3","国通标牌");
session.invalidate();
<!-- web的session -->
import java.swing.*;
import java.awt.*;
class StringDemo extends JFrame{
String key1 ="郑州标牌厂家";
String key2 ="郑州路牌厂家";
String key3 ="郑州停车场设施";
String key4 ="国通标牌";
String key5 ="郑州国通交通设施有限公司";
Label l1,l2,l3,l4,l5;
...
import javax.servlet.http.*;
class LoginServlet extends HttpServlet{
public void init(){
System.out.println("instance of the initalize");
}
public void service(ServletConfig servletConfig)throws ServletException{
public void doGet(...
void main()
{
int a,b[10],*p=b;
clrscr();
printf("Input ten numbers\n");
for(a=0;a<10;a++)
scanf("%d",p+a);
printf("Ten numbers are\n");
for(a=0;a<10;a++)
printf("%4d",*(p+a));
printf("\n");
getch();
}
void printArray()
{
int a ,b[3][4],d;
in...
新人报到
本人没基础想学C语言,请大家多多指点。介绍一些方法和书籍。谢谢
编写程序,求下面级数前n项中偶数项的和ES。在求和过程中,以第一个绝对值大于9999的项为末项,计算并输出和数ES。(其中^表示幂运算)题目出自:http://bbs.bccn.net/viewthread.php?tid=349405&pid=2005275&page=1#pid20052751!-2!+3!-4!+……+(-1)^(n-1)*n!+ ……
#include<stdio.h>void main(){ int OS=0,ES=0,SUM=0,n=1,temp=1;//奇数项和:OS,偶数项和:ES,奇偶数项和:SUM while(temp<...
void printArray()
{
int a,b,c[3][4];
clrscr();
printf("Input 12 numbers\n");
for(a=0;a<3;a++)
for(b=0;b<4;b++)
scanf("%d",&c[a][b]);
printf("12 numbers are\n");
for(a=0;a<3;a++)
for(b=0;b<4;b++)
printf("%4d",c[a][b]);
printf(...
class kingDemo{
public static void main(String args[]){
System.out.println("Input one Character\n");
String s ="jfei";
System.out.println(s.length());
System.out.println(s.charAt(23));
System.out.println();
System.out.println(s.s...
<?xml person
--//http:www.hngutong.com/com/jfei/20110907.dsd?>
<person>
<property name="name" value="jfei"/>
<property name="age" value="23"/>
<property name="sex" value="famele"/>
<property name="payment" value="1000$"/>
<property name="address" ...
/*时间:2011年9月7日14:26:51备注:动态内存分配,需要使用malloc函数,malloc是memory(内存)+allocate(分配)的缩写*/# include <stdio.h># include <malloc.h> //必须有,否则报错error C2065: 'malloc' : undeclared identifierint main (void){ int i= 5; //静态分配,分配了4个字节 int * p = (int*) malloc (4); ...
学习VFP
哥,近期做出决定以后靠计算机 吃饭。所以从现在开始想学点电脑知识。却不知道学那方面 用啥书??各位指点指点
刚来到这里 大家要多多关照哦
注册了编程中国的帐号以后好几天了,今天还是第一次上线浏览,希望和爱好软件编程的朋友们一起学习...
开学第二天,整个假期没有碰有关编程的东西,回来就觉得很生疏了,还得苦练呐!
当在远处时,我很想回来见见! 可能因为怀念吧,可现在回来了,却很想离开,害怕遇见某些人和某些事!
/*时间:2011年9月6日11:54:38目的:学习掌握指针与一维数组的关系和用法*/# include <stdio.h>//函数用来输出任何一个一维数组的内容void output (int * PArr,int len) //确定一个数组需要两个形参,1是数组的首个元素的地址,2是数组的长度 //必须要有长度,因为数组不像字符串有结束的标志 { int i; for (i=0; i<len; ++i) { // printf("%d ...
又回到这学校 了 ! 当 到了才发现自己并不是很想回来