锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久www免费人成精品,亚洲va久久久噜噜噜久久男同 ,青草影院天堂男人久久http://www.shnenglu.com/apple/category/8106.html涓栦笂鏈棤浜嬶紝搴鎬漢鑷壈涔嬶紒zh-cnSun, 15 Aug 2010 20:56:15 GMTSun, 15 Aug 2010 20:56:15 GMT60鍥炴枃http://www.shnenglu.com/apple/archive/2010/08/15/123503.html鏂囨畩騫挎硶鏂囨畩騫挎硶Sun, 15 Aug 2010 08:08:00 GMThttp://www.shnenglu.com/apple/archive/2010/08/15/123503.htmlhttp://www.shnenglu.com/apple/comments/123503.htmlhttp://www.shnenglu.com/apple/archive/2010/08/15/123503.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/123503.htmlhttp://www.shnenglu.com/apple/services/trackbacks/123503.html#include <iostream>
#include 
<string.h>
using namespace std;
bool is_equal(char str[]) 
{
 
int len=strlen(str);
 
if (len==0)
 
return false;
 
else if (len%2==0)
 
{
 
int mid=len/2;
 
bool flag=true;
 
int i,j; 
 
for(i=0, j=len-1;  i<mid; i++,j--)
 
{
 
if (str[i]==str[j]) 
  
continue;
 
else
 
{
 flag
=false;
 
break;
 }

 }

 
return flag;
 }

 
else
 
return false;
}

int main()
{
char str[]="helleh";
int return_val;
if (is_equal(str))
   return_val
=1;
   
else
   return_val
=0;
   cout
<<return_val<<endl;
}


鏂囨畩騫挎硶 2010-08-15 16:08 鍙戣〃璇勮
]]>
鏈夊簭澶氶」寮忕浉鍔?------------鏁版嵁緇撴瀯澶嶄範(fàn)http://www.shnenglu.com/apple/archive/2010/08/12/123256.html鏂囨畩騫挎硶鏂囨畩騫挎硶Thu, 12 Aug 2010 15:23:00 GMThttp://www.shnenglu.com/apple/archive/2010/08/12/123256.htmlhttp://www.shnenglu.com/apple/comments/123256.htmlhttp://www.shnenglu.com/apple/archive/2010/08/12/123256.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/123256.htmlhttp://www.shnenglu.com/apple/services/trackbacks/123256.html//鏈夊簭澶氶」寮忓姞娉?/span>
#include <iostream>
using namespace std;
struct Node
{
 
int coef;
 
int exp;
 Node 
*next;
}
;
class MExpression
{
 
private :
 Node 
*first;
 
public :
 MExpression();
 
void InsertNode(int coef,int exp);
 
void DeleteNode(int exp);
 
void Add(MExpression me);
 
void PrintAll();
}
;
MExpression::MExpression()
{
 first
->next=NULL;
}

void MExpression::InsertNode(int coef,int exp)
{
 Node 
*s=new Node();
 Node 
*p=first;
 
while(p->next!=NULL)
 p
=p->next;
 s
->coef=coef;
 s
->exp=exp;
 s
->next=p->next;
 p
->next=s;
}

void MExpression::DeleteNode(int exp)
{
 Node 
*p=first->next;
 Node 
*q;
 q
=first;
 
while(p!=NULL)
 
{
 
if (p->exp==exp) break;
  q
=p;
 p
=p->next;
 }

 q
->next=p->next;
 delete p;
}

void MExpression::Add(MExpression me)
{
 
int i=0,j=0;
 Node 
*p=first->next;
 Node 
*q=me.first->next;
 Node 
*pp,*qq;
 pp
=first;
 qq
=me.first; 
 
while(p&&q)
 
{
  
if (p->exp>q->exp)
  
{
  InsertNode(q
->coef,q->exp);
  q
=q->next;
  }

  
else if(p->exp==q->exp)
  
{
  p
->coef+=q->coef;
  p
=p->next;
  q
=q->next;
  }

  
else
  
{
  p
=p->next;
  }

 }

 
while(q)
 
{
  InsertNode(q
->coef,q->exp);
  q
=q->next;
  }

}

void MExpression::PrintAll()
{
cout
<<"=== coef c exp e ==="<<endl;
Node 
*p=first->next;
while(p!=NULL)
{
cout
<<p->coef<<"  c "<<p->exp<<" e ";
p
=p->next;
}

}

int main()
{
MExpression 
*me1=new MExpression();
MExpression 
*me2=new MExpression();
me1
->InsertNode(1,1);
me1
->InsertNode(2,2);
me1
->InsertNode(3,3);
me1
->InsertNode(4,4);
me2
->InsertNode(1,2);
me2
->InsertNode(2,3);
me2
->InsertNode(3,4);
me2
->InsertNode(4,5);
me1
->Add(*me2);
me1
->PrintAll();
}




]]>
寰幆鍙岄摼琛?---鏁版嵁緇撴瀯澶嶄範(fàn)http://www.shnenglu.com/apple/archive/2010/08/12/123243.html鏂囨畩騫挎硶鏂囨畩騫挎硶Thu, 12 Aug 2010 12:36:00 GMThttp://www.shnenglu.com/apple/archive/2010/08/12/123243.htmlhttp://www.shnenglu.com/apple/comments/123243.htmlhttp://www.shnenglu.com/apple/archive/2010/08/12/123243.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/123243.htmlhttp://www.shnenglu.com/apple/services/trackbacks/123243.html/*
寰幆鍙岄摼琛?br>
*/


#include 
<iostream>
using namespace std;
struct Node
{
 
int data;
 Node 
*next;
 Node 
*prior;
}
;

class CycleDLList
{
 
private :
 Node 
*first;
 
public:
 CycleDLList();
 
void InsertNode(int data);
 
void DeleteNode(int data);
 
void PrintAll();
}
;

CycleDLList::CycleDLList()
{
 first
->prior=first;
 first
->next=first;
}

void CycleDLList::InsertNode(int data)
{
 Node 
*s=new Node();
 s
->data=data;
 Node 
*p=first->next;
  
while(p->next!=first)
  
{
   p
=p->next;
  }

  s
->prior=p;
  s
->next=p->next;
  p
->next->prior=s;
  p
->next=s;
}

void CycleDLList::DeleteNode(int data)
{
 Node 
*p=first->next;
 Node 
*q;
 
while(p!=first)
 
{
 
if(p->data==data) break;
 q
=p;
 p
=p->next;
 }

 
if (p!=first)
 
{
 q
->next=p->next;
 p
->next->prior=q;
 delete p;
 }

}

void CycleDLList:: PrintAll()
{
Node 
*p=first->next;
Node 
*q=first->prior;
cout
<<"p=p->next"<<endl;
while(p!=first)
{
cout
<<p->data<<" ";
p
=p->next;
}

cout
<<endl;
cout
<<"q=q->prior"<<endl;
while(q!=first)
{
cout
<<q->data<<" ";
q
=q->prior;
}

}

int main()
{
CycleDLList 
*cd=new CycleDLList();
cd
->InsertNode(5);
cd
->InsertNode(4);
cd
->InsertNode(3);
cd
->InsertNode(2);
cd
->PrintAll();
cd
->DeleteNode(2);
cd
->PrintAll();


}



鏂囨畩騫挎硶 2010-08-12 20:36 鍙戣〃璇勮
]]>
寰幆鍗曢摼琛?---澶嶄範(fàn)鏁版嵁緇撴瀯http://www.shnenglu.com/apple/archive/2010/08/09/122778.html鏂囨畩騫挎硶鏂囨畩騫挎硶Mon, 09 Aug 2010 06:58:00 GMThttp://www.shnenglu.com/apple/archive/2010/08/09/122778.htmlhttp://www.shnenglu.com/apple/comments/122778.htmlhttp://www.shnenglu.com/apple/archive/2010/08/09/122778.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/122778.htmlhttp://www.shnenglu.com/apple/services/trackbacks/122778.html 1#include <iostream>
 2using namespace std;
 3
 4struct Node
 5 {
 6  int data;
 7  Node *next;
 8 }
;
 9 class CycleLinkList
10  {
11   private :
12   Node *first;
13   public :
14   CycleLinkList();
15   void InsertNode(int data);
16   void DeleteNode(int data);
17   void PrintAll();
18   }
;
19   
20   CycleLinkList:: CycleLinkList()
21   {
22    first=first->next;
23   }

24   void CycleLinkList::InsertNode(int data)
25   {
26   Node *s=new Node();
27   s->data=data;
28   Node *p=first;
29   if (p->next==first)
30   {
31   s->next=first->next;
32   first->next=s;
33   }

34   else
35   {
36   while(p->next!=first) p=p->next;
37   s->next=p->next;
38   p->next=s;
39   }

40   }

41   
42   void CycleLinkList::DeleteNode(int data)
43   {
44   Node *p=first->next;
45   Node *q=first->next;
46   while(p!=first)
47   {
48    if (p->data==data) break;
49    else
50    {
51    q=p;
52    p=p->next;
53    }

54   }

55   q->next=p->next;
56   delete p;   
57   }

58   void CycleLinkList:: PrintAll()
59   {
60   Node *p=first->next;
61   
62   while(p!=first)
63   {
64   cout<<p->data<<"  ";
65   p=p->next;
66   }

67   }

68   int main()
69   {
70   CycleLinkList *cl=new CycleLinkList();
71   cl->InsertNode(3);
72   cl->InsertNode(4);
73   cl->InsertNode(5);
74   cl->InsertNode(6);
75   cl->PrintAll();
76   cl->DeleteNode(4);
77   cl->PrintAll();
78   }


鏂囨畩騫挎硶 2010-08-09 14:58 鍙戣〃璇勮
]]>
綆鍗曢錛氾細(xì)鏂愭嘗閭e鏁板垪http://www.shnenglu.com/apple/archive/2008/09/07/61221.html鏂囨畩騫挎硶鏂囨畩騫挎硶Sun, 07 Sep 2008 07:29:00 GMThttp://www.shnenglu.com/apple/archive/2008/09/07/61221.htmlhttp://www.shnenglu.com/apple/comments/61221.htmlhttp://www.shnenglu.com/apple/archive/2008/09/07/61221.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/61221.htmlhttp://www.shnenglu.com/apple/services/trackbacks/61221.html璁$畻鍑?/1 + 2/1 + 3/2 + 5/3 + 8/5 + 13/8 + .....涓鐩村埌絎琻欏圭殑鍜岋紝
姣忛」鐨勫垎瀛愬垎姣嶆槸鐢辨枑娉㈤偅濂戞暟鍒椾腑鍙栫浉閭?cè)潥勪袱涓緱鍒板Q岃綆楃粨鏋滀繚鐣欎笁浣嶅皬鏁?/font>
#include <iostream>
#include 
<iomanip>
using namespace std;
int main(){
    
    
int n;
    
double t;
    
while(cin>>n){
    
double a=1;
    
double b=1;
    
double sum=0;
        
for(int i=1;i<=n;i++){
        sum
+=a/b;
        t
=a;
        a
+=b;
        b
=t;
        
    }
cout<<setiosflags(ios::fixed)<<setprecision(3);
    cout
<<sum<<endl;
    }

    
    
return 0;
}


鏂囨畩騫挎硶 2008-09-07 15:29 鍙戣〃璇勮
]]>
寰幆縐諱綅http://www.shnenglu.com/apple/archive/2008/09/07/61205.html鏂囨畩騫挎硶鏂囨畩騫挎硶Sun, 07 Sep 2008 04:54:00 GMThttp://www.shnenglu.com/apple/archive/2008/09/07/61205.htmlhttp://www.shnenglu.com/apple/comments/61205.htmlhttp://www.shnenglu.com/apple/archive/2008/09/07/61205.html#Feedback1http://www.shnenglu.com/apple/comments/commentRss/61205.htmlhttp://www.shnenglu.com/apple/services/trackbacks/61205.html
#include 
<iostream>
#include 
<string>
using namespace std;
const int Max=100;
char *sreverse(char *s,int a,int b)
{
  
char e;
  
char c;
if(b>a)
{
  c
=s[a];
  e
=s[b];
  s[a]
=e;
  s[b]
=c;
  a
++;
  b
--;
  sreverse(s,a,b);
}

  
return s;
}

int main()
int i;
char *a=new char[Max];
char *p;
cin
>>a;
cin
>>i;
if(i==0) cout<<a<<endl;
else if(i<0){
    i
=-i;
   sreverse(a,
0,i-1);
   sreverse(a,i,strlen(a)
-1);
   p
=sreverse(a,0,strlen(a)-1);
   cout 
<<p<<endl;
}

else { sreverse(a,strlen(a)-i,strlen(a)-1);
       sreverse(a,
0,strlen(a)-i-1);
       p
=sreverse(a,0,strlen(a)-1);
   cout 
<<p<<endl;

}

return 0;
}
鑳戒笉鑳借繘琛屼紭鍖栧晩錛岃秴鏃訛紒錛侊紒

鏂囨畩騫挎硶 2008-09-07 12:54 鍙戣〃璇勮
]]>
鍥炴枃鏁板瓧鐨勫垽鏂?http://www.shnenglu.com/apple/archive/2008/09/06/61088.html鏂囨畩騫挎硶鏂囨畩騫挎硶Sat, 06 Sep 2008 01:26:00 GMThttp://www.shnenglu.com/apple/archive/2008/09/06/61088.htmlhttp://www.shnenglu.com/apple/comments/61088.htmlhttp://www.shnenglu.com/apple/archive/2008/09/06/61088.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/61088.htmlhttp://www.shnenglu.com/apple/services/trackbacks/61088.html#include <iostream>
using namespace std;

int Rev(int n){
    
char ch;
    
if(n>10000) ch='a';
    
else if(n>1000) ch='b';
    
else if(n>100) ch='c';
    
else if(n>10) ch='d';
    
else if(n>0) ch='e';
    
else return 1;
    
switch(ch){
        
case 'a':if((n/10000)==(n%10)&&((n%10000)/1000)==((n%100)/10)) return 1;
                 
else return 0;
                 
break;
        
case 'b':if((n/1000)==(n%10)&&((n%1000)/100)==((n%100)/10)) return 1;
                 
else return 0;break;
        
case 'c'if((n/100)==(n%10)) return 1;
                 
else return 0;break;
        
case 'd'if((n/10)==(n%10)) return 1;
                 
else return 0;break;
        
case 'e'return 0;
    }
 return 0;
}

  
int main()
  
{ cout<<Rev(654);
      cout
<<Rev(12321);
      cout
<<Rev(322);
      
return 0;
  }


鏂囨畩騫挎硶 2008-09-06 09:26 鍙戣〃璇勮
]]>
綆鍗曢摼闃熷垪http://www.shnenglu.com/apple/archive/2008/09/05/61065.html鏂囨畩騫挎硶鏂囨畩騫挎硶Fri, 05 Sep 2008 15:16:00 GMThttp://www.shnenglu.com/apple/archive/2008/09/05/61065.htmlhttp://www.shnenglu.com/apple/comments/61065.htmlhttp://www.shnenglu.com/apple/archive/2008/09/05/61065.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/61065.htmlhttp://www.shnenglu.com/apple/services/trackbacks/61065.html#include <iostream>
using namespace std;

struct Node{
  
int data;
  Node 
*next;
}
;

  
class Linkqueue{
   
public:
     Linkqueue();
     
~Linkqueue();
     
void Enqueue(int x);
     
int Dequeue();
     
int Getqueue();
   
private:
     Node 
*front;
     Node 
*rear;
}
;
  Linkqueue::Linkqueue()
{
     Node 
*s;
     s
=new Node;
     s
->next=NULL;
     front 
= rear=s;
}

  Linkqueue::
~Linkqueue(){
     Node 
*p;
     p
=new Node;
    
while(front!=rear){
     p
=front->next;
     p
->next=front->next;
     delete front;
     front
=p;
    }
 
  }

 
void Linkqueue::Enqueue(int x){
     Node 
*s;
     s
=new Node;
      s
->data=x;
      s
->next=NULL;
      rear
->next=s;
      rear
=s;
 }

 
int Linkqueue::Dequeue(){
      
if(front==rear) throw "error";
      Node 
*p;
      p
=new Node;
      p
=front->next;
      
int x=p->data;
      front
->next= p->next;
      
if(p->next=NULL) rear=front;
      delete p;
       
return  x;
}

  
int Linkqueue::Getqueue(){
      
return front->next->data;
}

  
void main()
{

    Linkqueue q;
   q.Enqueue(
2);
   cout
<<q.Getqueue()<<endl;
   q.Enqueue(
3);
   q.Enqueue(
4);
   cout
<<q.Dequeue()<<endl;
   cout
<<q.Getqueue();
}


鏂囨畩騫挎硶 2008-09-05 23:16 鍙戣〃璇勮
]]>
綆鍗曢『搴忔爤http://www.shnenglu.com/apple/archive/2008/08/31/60487.html鏂囨畩騫挎硶鏂囨畩騫挎硶Sun, 31 Aug 2008 03:02:00 GMThttp://www.shnenglu.com/apple/archive/2008/08/31/60487.htmlhttp://www.shnenglu.com/apple/comments/60487.htmlhttp://www.shnenglu.com/apple/archive/2008/08/31/60487.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/60487.htmlhttp://www.shnenglu.com/apple/services/trackbacks/60487.html#include <iostream>
using namespace std;
const int MAX=100;
 
class Seqstack{
 
public:  
  
int Gettop();
  
void Push(int x);
  Seqstack();
 
private:
   
int top;
   
int data[MAX];
}
;
  Seqstack::Seqstack()
{
  top
=-1;
}

  
void Seqstack::Push(int x){
   cout
<<"enter a number:"<<endl;
   cin
>>x;
   data[
++top]=x;
   cout
<<top<<endl;
}

   
int Seqstack::Gettop(){
   
int x;
   x
=data[top];
  cout
<<x;
   
return 0;
}
  
  
void main()
{
  Seqstack s;
  s.Push(
5); 
  s.Push(
4);
  s.Gettop();
}
 

鏂囨畩騫挎硶 2008-08-31 11:02 鍙戣〃璇勮
]]>
綆鍗曞崟閾捐〃http://www.shnenglu.com/apple/archive/2008/08/30/60431.html鏂囨畩騫挎硶鏂囨畩騫挎硶Sat, 30 Aug 2008 05:08:00 GMThttp://www.shnenglu.com/apple/archive/2008/08/30/60431.htmlhttp://www.shnenglu.com/apple/comments/60431.htmlhttp://www.shnenglu.com/apple/archive/2008/08/30/60431.html#Feedback0http://www.shnenglu.com/apple/comments/commentRss/60431.htmlhttp://www.shnenglu.com/apple/services/trackbacks/60431.html 

#include <iostream>
using namespace std;
struct Node{
  
int data;
  Node 
*next;
}
;
  
class Linklist{
    
public:
     Linklist(
int a[],int n);
     
int Get(int x);
    
private:
    Node 
*first;
}
;
  Linklist::Linklist(
int a[],int n){
       first 
=new Node; 
       first
->next=NULL;//鍒濆鍖栫┖閾捐〃
       Node *s;
       
forint i=0;i<n;i++)
    
{
       s
=new Node;
       s
->data=a[i];      
       s
->next=first->next;
        first
->next=s;
      }

  }

  
int Linklist::Get(int x){
       Node 
*s;
       s
=new Node;
       s
=first->next;
       
int j=1;  
       
while(s->data!=x)
      
{ s=s->next;
         j
++;
    }
if(s)   
    
return j;
}

   
void main()
{  int a[]={1,2,3,4,5};
   Linklist s(a,
5);
     cout
<< s.Get(3);
}


鏂囨畩騫挎硶 2008-08-30 13:08 鍙戣〃璇勮
]]>
綆鍗曢『搴忚〃http://www.shnenglu.com/apple/archive/2008/08/29/60365.html鏂囨畩騫挎硶鏂囨畩騫挎硶Fri, 29 Aug 2008 07:58:00 GMThttp://www.shnenglu.com/apple/archive/2008/08/29/60365.htmlhttp://www.shnenglu.com/apple/comments/60365.htmlhttp://www.shnenglu.com/apple/archive/2008/08/29/60365.html#Feedback2http://www.shnenglu.com/apple/comments/commentRss/60365.htmlhttp://www.shnenglu.com/apple/services/trackbacks/60365.html#include <iostream>
using namespace std;
const int Max=100;

class Seqlist{
  
   
public:
  Seqlist(
int a[],int n);
 
void Get(int i);
  
private:
  
int length;
  
int b[Max];
 }
;
  Seqlist::Seqlist(
int a[],int n)
  
{
      
for(int i=0;i<n;i++)
      
{
      b[i]
=a[i];
      cout
<<b[i]<<"  "
    }
        length=n;
}

 
void Seqlist::Get(int x){
   
for(int i=0;i<length;i++)
  
{
 
if(x==b[i])
   
{ cout<<i;
 }

 
else
 
{
 }
 
}

  }

 
void main()
int n;
  
int *a;
   
int x;
 
  cout
<<"please enter two number:"<<endl;
  cin
>>n;
 cin
>>x;
  a
=new int[n];
  cout
<<"enter "<<n<<" numbers:";
for(int i=0;i<n;i++)
  cin
>>a[i];
  Seqlist s(a,n);
  s.Get(x);
}


鏂囨畩騫挎硶 2008-08-29 15:58 鍙戣〃璇勮
]]>
91精品婷婷国产综合久久| 中文国产成人精品久久不卡| 欧美午夜A∨大片久久| 欧美激情一区二区久久久| 亚洲va久久久噜噜噜久久天堂 | 无码人妻久久久一区二区三区| 国产欧美久久久精品| 欧美激情精品久久久久久久九九九| 日本久久久久亚洲中字幕| 久久久久国产精品麻豆AR影院| 国产精品99久久久精品无码| 亚洲精品高清久久| 久久www免费人成看片| 99久久国产热无码精品免费久久久久 | 香蕉久久一区二区不卡无毒影院 | 亚洲愉拍99热成人精品热久久| 久久国产一区二区| 国产成人精品久久| 久久国产精品免费一区二区三区| 一本色道久久综合亚洲精品| 久久精品国产欧美日韩| 国产精品99久久免费观看| 亚洲国产精品成人久久蜜臀 | 久久久久人妻精品一区二区三区 | 久久99精品国产麻豆宅宅| 色播久久人人爽人人爽人人片AV| 国产69精品久久久久9999| 精品久久久久久久久午夜福利| 亚洲国产高清精品线久久 | 久久噜噜电影你懂的| 99久久夜色精品国产网站 | 久久精品国产99久久香蕉| 久久久噜噜噜www成人网| 亚洲婷婷国产精品电影人久久| 99热都是精品久久久久久| 国产精品无码久久久久久| 伊人久久综合精品无码AV专区| 麻豆久久久9性大片| 久久精品国产亚洲Aⅴ蜜臀色欲| 99精品国产在热久久无毒不卡| 亚洲精品高清国产一线久久|