锘??xml version="1.0" encoding="utf-8" standalone="yes"?>在线观看欧美日韩,欧美日韩国产在线看,在线观看91精品国产麻豆http://m.shnenglu.com/jince/category/14831.html鍘氬痙鑷磋繙錛屽崥瀛︽暒琛岋紒zh-cnFri, 29 Oct 2010 22:22:13 GMTFri, 29 Oct 2010 22:22:13 GMT60鍒ゆ柇鍥炴枃鏁板瓧http://m.shnenglu.com/jince/archive/2010/10/29/131779.htmljincejinceFri, 29 Oct 2010 11:57:00 GMThttp://m.shnenglu.com/jince/archive/2010/10/29/131779.htmlhttp://m.shnenglu.com/jince/comments/131779.htmlhttp://m.shnenglu.com/jince/archive/2010/10/29/131779.html#Feedback0http://m.shnenglu.com/jince/comments/commentRss/131779.htmlhttp://m.shnenglu.com/jince/services/trackbacks/131779.html     鎴戝啓浜?jiǎn)鍑犱釜锛堜笉澶氳浜?jiǎn)姣旇緝绱洿鎺ヤ笂浠g爜浜?jiǎn)锛?jí)錛?
#include<stdio.h>
#include
<string.h>
#include
<math.h>
#include
<stdlib.h>
void Numtostring(int num,char s[])  //鑷畾涔夋暟瀛楄漿鎹㈡垚瀛楃涓插嚱鏁?nbsp;
{
    
int temp,i=0;
//    char *s;
//    s=(char *)malloc(500); 
    
//char s[500];
    while(num!=0)
    
{
        temp
=num%10;
        s[i]
=temp+48;
        i
++;
        num
=num/10;    
    }

    s[i]
='\0';
    strrev(s);
}

int NumberTest0(int num)  //鏁板瓧閫嗗簭錛岃繑鍥為嗗簭鍊?nbsp;
{
    
int temp;
    
int n,i;
    
int num0=0;
    n
=log10(num);
    printf(
"n=%d\n",n);
    
for(i=n;i>=0;i--)
    
{
        temp
=num%10;
        num
=num/10;
        num0
+=temp*pow(10,i);
        printf(
"num0=%d\n",num0);
    }

    
return num0;    
}

int StringTest(int num)//鍥炴枃鍒ゆ柇錛屽瓧絎︿覆閫嗚漿鎬濊礬 
{
    
char s[500],s1[500];
    Numtostring(num,s);
//鏁板瓧杞崲鎴愬瓧絎︿覆鍑芥暟 
    puts(s);
    strcpy(s1,s);
    strrev(s1);
    
if(strcmp(s1,s)==0)
        printf(
"Yes\n");
    
else
        printf(
"No\n");
    
return 0;
}


int NumberTest1(int n)//鍥炴枃鍒ゆ柇 鑰佸笀瑙i鎬濊礬 鍚鏄ぇ紲炵駭鐨勪漢鐗╁啓鐨勩傘傘?/span>
{
    
int temp=0;
    
int m=n;
    
while(n)
    
{
        temp
=temp*10
        temp
+=n%10;
        n
=n/10;
    }

    printf(
"%d\n",temp);
    
if(temp==m)
        printf(
"Yes\n");
    
else
        printf(
"No\n");
    
return 0;
}

int main()
{

    
int num,num0;
//    long n;
    char s[500];
    
while(scanf("%d",&num)!=EOF)
    
{
      
/*num0=Test(num);
        printf("%d\n",num0);
        if(num0==num)
            printf("Yes\n");
        else
            printf("No\n");
*/

    
//    Numtostring(num,s);
    
//    puts(s);
    
//    StringTest(num); 
        NumberTest1(num);
    }

    
return 0;
}
 


    

jince 2010-10-29 19:57 鍙戣〃璇勮
]]>
瀹瑰櫒http://m.shnenglu.com/jince/archive/2010/09/03/125787.htmljincejinceFri, 03 Sep 2010 05:52:00 GMThttp://m.shnenglu.com/jince/archive/2010/09/03/125787.htmlhttp://m.shnenglu.com/jince/comments/125787.htmlhttp://m.shnenglu.com/jince/archive/2010/09/03/125787.html#Feedback0http://m.shnenglu.com/jince/comments/commentRss/125787.htmlhttp://m.shnenglu.com/jince/services/trackbacks/125787.html         C++ 涓璿ector瀹瑰櫒錛屾尯濂界敤鐨勶紝璁板綍涓涓嬶紒鎸夌収vector瀹瑰櫒鍑芥暟璇存槑嫻嬩簡(jiǎn)涓涓嬶紝涓涓搴旈獙錛?br>浠g爜濡備笅錛?br>
#include<stdio.h>
#include<vector>
#include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
bool cmp(const int &a,const int &b)
{
    return a>b;
}
int main()
{
    vector<int> v1;
    v1.push_back( 0 );
    v1.push_back( 1 );
    v1.push_back( 2 );
    v1.push_back( 3 );
 
    vector<int> v2;
    v2.push_back( 5 );
    v2.push_back( 6 );
    v2.push_back( 7 );
    v2.push_back( 8 );
 
    cout << "Before, v2 is: ";
    for( vector<int>::size_type i = 0; i < v2.size(); i++ ) {
      cout << v2[i] << " ";
    }
    cout << endl;
 
 /**//* cout << "Before, v2 is: ";
    for( vector<int>::iterator iter =v2.begin() ; iter < v2.end(); iter++ ) {
      cout << *iter << " ";
    }
    cout << endl;//榪唬鍣紝鐩稿綋浜庢寚閽堢殑姒傚康銆傘?/

  //  v2.insert( v2.end(), v1.begin(), v1.end() );//鍦╲2鏈熬鎻掑叆v1

  //  v2.insert(v2.end(),3,'3');    //鍦╲2鏈熬鎻掑叆3涓?1

  //  swap(v1,v2);
  //  v1.swap(v2);                    //浜ゆ崲

  //  printf("%d\n",v2.at(2));         // 杈撳嚭鎸囧畾浣嶇疆鍊?br>
  //  sort(v2.begin(),v2.end(),cmp); //鎺掑簭錛屼竴鐩存病寮勬槑鐧絚mp

  //  sort(v2.begin(),v2.end(),greater<int>()); //閫掑噺鎺掑簭
    
  //  sort(v2.begin(),v2.end(),less<int>());  //閫掑鎺掑簭

  //  v2.assign(v1.begin(),v1.end());//鎷瘋礉v1鍒皏2

  //  v2.erase(v2.end()-1,v2.end()); //鍒犻櫎瀹瑰櫒鍏冪礌錛屼笉鍖呮嫭絎竴涓暟

  //  v2.clear();   //娓呯┖

  //  v2.resize(2);        //淇敼鍏冪礌涓暟

    cout << "After, v2 is: ";
    for( vector<int>::size_type j = 0; j < v2.size(); j++ ) {
      cout << v2[j] << " ";
    } 
    return 0;
}


jince 2010-09-03 13:52 鍙戣〃璇勮
]]>
C++ 閲嶈澆嫻佺殑鎻愬彇鎿嶄綔http://m.shnenglu.com/jince/archive/2010/09/02/125690.htmljincejinceThu, 02 Sep 2010 14:08:00 GMThttp://m.shnenglu.com/jince/archive/2010/09/02/125690.htmlhttp://m.shnenglu.com/jince/comments/125690.htmlhttp://m.shnenglu.com/jince/archive/2010/09/02/125690.html#Feedback0http://m.shnenglu.com/jince/comments/commentRss/125690.htmlhttp://m.shnenglu.com/jince/services/trackbacks/125690.html      浠g爜濡備笅錛?nbsp;
      COMPLEX.HPP鏂囦歡
#include<iostream.h>
class COMPLEX {
public :
    COMPLEX(
double r=0,double i=0);
    COMPLEX(
const COMPLEX& other);
    COMPLEX 
operator +(const COMPLEX& other);
    COMPLEX 
operator -(const COMPLEX& other);
    COMPLEX 
operator -();
    COMPLEX 
operator =(const COMPLEX &other);
    friend ostream
& operator <<(ostream& stream,COMPLEX& obj);
    friend istream
& operator <<(istream& stream,COMPLEX& obj);
public :
    
double real,image;
}
;
      COMPLEX.CPP鏂囦歡
//COMPLEX.CPP鏂囦歡


#include 
"COMPLEX.HPP" //灝嗗ご鏂囦歡鍖呮嫭榪涘幓,涓嶈兘鍐欐垚include<COMPLEX.CPP>銆傘傘?/span>

COMPLEX::COMPLEX(
double r,double i)   
{
    real
=r;
    image
=i;
    
return ;
}


COMPLEX::COMPLEX(
const COMPLEX& other)
{
    real
=other.real;
    image
=other.image;
    
return ;
}


COMPLEX COMPLEX::
operator +(const COMPLEX& other)   //榪愮畻絎?閲嶈澆  鍙傛暟涓篊OMPLEX綾誨瀷錛岃繑鍥炲間負(fù)COMPLEX綾誨瀷鐨勫紩鐢紝涓嬪悓
{
    COMPLEX temp;

    temp.real
=real+other.real;
    temp.image
=image+other.image;
    
return temp;
}


COMPLEX COMPLEX::
operator -(const COMPLEX& other)
{
    COMPLEX temp;

    temp.real
=real-other.real;
    temp.image
=image-other.image;
    
return temp;
}



COMPLEX COMPLEX::
operator =(const COMPLEX& other)
{
    real
=other.real;
    image
=other.image;
    
return *this;
}


ostream
& operator<<(ostream& stream,COMPLEX& obj)   //嫻佹彁鍙栫閲嶈澆鏈変袱涓弬鏁幫紝絎竴涓弬鏁板嚭鐜板湪<<鎿嶄綔絎﹀乏渚э紝涓簅stream寮曠敤錛岀浜屼釜鍑虹幇鍦ㄦ搷浣滅<<鍙充晶錛屼負(fù)COMPLEX寮曠敤錛岃繑鍥炲兼槸涓涓猳stream鐨勫璞″紩鐢紝涓嬪悓
{
    stream
<<obj.real;
    
if(obj.image>0)  stream<<"+"<<obj.image<<"i";
    
else if(obj.image<0) stream<<obj.image<<"i";
    
return stream;
}


istream
& operator>>(istream& stream,COMPLEX& obj)
{
    cout
<<"Input real part:";
    stream
>>obj.real;
    cout
<<"input image part:";
    stream
>>obj.image;
    
return stream;
}


int main()
{
    COMPLEX c1,c2;

    cout
<<"Input the first complex number c1:"<<endl;

    cin
>>c1;

    cout
<<"Input the second compex number c2:"<<endl;

    cin
>>c2;

    cout
<<"c1 is"<<c1<<endl;
    
    cout
<<"c2 is"<<c2<<endl;

    cout
<<"c1+c2 is "<<c2+c1<<endl;

    cout
<<"c1-c2 is "<<c1-c2<<endl;
    
//鎿嶄綔絎﹀師鍔熻兘浠誨瓨鍦?/span>

    
int a=50,b=10;

    cout
<<"A="<<a<<"\tB"<<b<<endl;

    cout
<<"A+B is "<<a+b<<endl;

    cout
<<"A-B is "<<a-b<<endl;

    a
=-b;
    cout
<<"A=-B,A="<<a<<"\tB"<<b<<endl;

    a
=b;
    cout
<<"A=B,A="<<a<<"\tB"<<b<<endl;
    
return 0;
}

杈撳嚭緇撴灉錛?br>

jince 2010-09-02 22:08 鍙戣〃璇勮
]]>
国产毛片欧美毛片久久久| 亚洲国产精品久久久久| 精品综合久久久久久97| 久久精品国产网红主播| 久久婷婷五月综合色99啪ak| 99久久99久久精品国产片果冻| 久久婷婷五月综合国产尤物app | 日韩欧美亚洲综合久久| 欧美va久久久噜噜噜久久| 久久国产综合精品五月天| 久久99精品久久只有精品| 日韩美女18网站久久精品| 精品999久久久久久中文字幕| 伊人久久成人成综合网222| 91精品无码久久久久久五月天| 久久精品国产久精国产一老狼| 久久精品国产精品亜洲毛片| 久久精品国产亚洲77777| 一本色道久久综合狠狠躁篇| 精品久久久久中文字幕一区| 99久久婷婷国产综合亚洲| 精品久久久久成人码免费动漫| 青青青国产成人久久111网站| 久久人人妻人人爽人人爽| 国色天香久久久久久久小说| 伊人久久大香线蕉综合5g| 免费一级欧美大片久久网| 狠狠综合久久综合中文88| 91精品婷婷国产综合久久| 999久久久免费国产精品播放| 国内精品久久久人妻中文字幕| 久久精品麻豆日日躁夜夜躁| 性做久久久久久久| 国产三级久久久精品麻豆三级 | 亚洲国产另类久久久精品| 久久精品国产亚洲AV香蕉| 亚洲欧洲久久久精品| 久久精品国产欧美日韩99热| 亚洲国产精品综合久久网络| 国产精品成人久久久| 色妞色综合久久夜夜|